Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th November 2012, 03:15   #1  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Any function to find the size of a given pixel of the image?

Hi, I guess if exists some function for determining size of pixel

For example:

float length= getpixel(0,0).length() # Decimal inches

float width = getpixel(0,0).width()
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite

Last edited by Overdrive80; 26th November 2012 at 07:21.
Overdrive80 is offline   Reply With Quote
Old 26th November 2012, 07:25   #2  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
i'm not sure if you're looking for pixel aspect ratio or a ruler...
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 26th November 2012, 09:43   #3  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Im looking for size pixel for re-writing a function, it use this info for identifying type of source for others reasons
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite

Last edited by Overdrive80; 26th November 2012 at 09:45.
Overdrive80 is offline   Reply With Quote
Old 26th November 2012, 10:33   #4  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
A pixel has the dimensions: width = 1 pixel, height = 1 pixel. Then there is the width/height relation known as "aspect ration", but that's it. No such thing as a "physical" dimension. For that you need a correlated measure like "DPI" in digital images. For video, DPI information usually doesn't exist. And when importing images (with embedded DPI information) into Avisynth, the DPI information is lost, AFAIK.

And in case "aspect ratio" is what you're looking for in fact: this information usually doesn't exist in Avisynth either, everything is pixelaspect 1:1 there. External applications like e.g. MeGUI might embedd the AR, by figuring it by themselves from the source file, and writing the value into the script (as global variable). But that's a specific of the frontend, and not an Avisynth thing.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 26th November 2012, 15:20   #5  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Ok, I did think that as video is composited for images, its would have dpi info. For your answer, with avisynth is impossible. Thanks for clarification.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite
Overdrive80 is offline   Reply With Quote
Old 26th November 2012, 16:43   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
You have screen metrics for your desktop. You could obtain that from a windows call and combine that with knowledge of the resolution in pixels to generate a "size per pixel". You'd have to write a plugin for that because there is no such existing function in Avisynth.
Guest is offline   Reply With Quote
Old 26th November 2012, 22:15   #7  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Quote:
Originally Posted by neuron2 View Post
You have screen metrics for your desktop. You could obtain that from a windows call and combine that with knowledge of the resolution in pixels to generate a "size per pixel". You'd have to write a plugin for that because there is no such existing function in Avisynth.
Unfortunately, I haven´t knowledges nor means for that. Thanks
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite
Overdrive80 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.