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. |
|
|
Thread Tools | Search this Thread | Display Modes |
26th November 2012, 03:15 | #1 | Link |
Anime addict
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. |
26th November 2012, 09:43 | #3 | Link |
Anime addict
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. |
26th November 2012, 10:33 | #4 | Link |
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!) |
26th November 2012, 15:20 | #5 | Link |
Anime addict
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 |
26th November 2012, 16:43 | #6 | Link |
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.
|
26th November 2012, 22:15 | #7 | Link | |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
Quote:
__________________
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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|