Tuesday, June 23, 2015
by Brother Gabriel-Marie
A handy, dandy pixel-to-inches calculator
Decimal Result at 72 DPI
Fractional Result at 300 DPI
A simple pixel calculator.
It will figure inches from pixels and vice-versa.
Useful for knowing the print size and screen size of images.
•You enter the DPI, the Width and the Height, and then select the conversion mode.
•The Result is recalculated automatically with every change, so you get a live response.
•Every time a new result is generated it is automatically copied to your clipboard (unless you disable this in the options).
•Fraction Toggle Button: next to the result box, there is a button; this is a toggle button which will convert the result to/from fraction/decimal (see the second image above).
It will convert the answer if the result is in centimeters or inches (you can't have fractions of a pixel, so the answer will be rounded if the result is in pixels).
•You can open the Settings panel (which is also the About box) by pressing the button in PixCalc (see image above).
•You can open the help file by pressing in the About Box.
•You can just drag-drop an image onto PixCalc and it will read the file for you and automatically fetch the height, width and dpi.
You can load PixCalc with a particular image via commandline.
Parameters can be given in any order.
If you don't specify any parameters then PixCalc will use the settings in it's configuration.
So, basically, all you need on the commandline is the path to the file; the other parameters are just to override your configuration's defaults.
Usage: pixcalc.exe [parameters]
Example: pixcalc.ahk "c:\images\screenshot.png"
Example: pixcalc.ahk -p2i -decimal "c:\images\screenshot.png" -notray
-p2i pixels-to-inches mode
-i2p inches-to-pixels mode
-p2c pixels-to-centimeters mode
-c2p centimeters-to-pixels mode
-decimal decimal result
-fraction fraction result
-notray disables the tray icon for this instance (but does not change the saved settings)
In certain applications such as XnView and FreeCommander, you can create app-buttons. You can use PixCalc with an app-button and use the -notray parameter. That way, you can check your image info with PixCalc and just close the window to exit - and all the while keep your regular instance running in the system tray.
To exit PixCalc, if you have the tray icon enabled, you use the tray menu to exit (or push ctrl+Q when PixCalc is open).
If the tray icon is not enabled then you can exit normally.
The settings are all pretty self-explanatory!
You can push the button to open this here help file.
ctrl+Q = Quit Program
Ctrl+I = Open ini file (you probably don't need this)
Ctrl+O = Open Options/About panel
Ctrl+H = Open this Help file
F1 = Open this Help File
and, you can close the About/Settings window by pushing ESCAPE or by pushing the button again.
If you enable Use Tray Icon, then, instead of exiting, PixCalc will hide in the system tray on your taskbar; you will then need to either exit PixCalc from the tray icon menu or by pushing Ctrl+Q.
It all hinges on the dpi of your image. PixelCalc just does the division/multiplication for you.
•To convert inches to pixels: pixels = inches * dpi
•To convert pixels to inches: inches = pixels /dpi
•to convert centimeters to pixels, first you have to convert dots-per-inch (dpi) to dots-per-cm (dpc)
Since there are 0.3937 inches in a centimeter, then you just multiply by that:
To figure centimeters from pixels: dots-per-centimeters = dpi * 0.3937
A note: It is possible, in the dpi, for an image to have different horizontal resolution than it's vertical resolution. Although you can't calculate with this difference using the interface, when you drag an image onto PixCalc, it does take this into account and provides you with an accurate squared dpi: dpi = sqrt(horizontal_res * vertical_res)
By using this program you thereby agree to the terms of this license agreement. You use this application at your own risk, and assume the entire responsibility of it use - that means that if it does something dastardly to your computer, it is your own fault. However, to reassure you, know that the authour has tested it and uses it himself.
This application may be used for any use private or commercial, and without any fees. You may distribute it however you like as long as you don't charge for it, and as long as it remains unchanged, and is accompanied by this help file.
June 25, 2015
•Added commandline support.
•Added No Tray Icon option.
•Removed the single-instance limitation in order to support commandline use alongside a regular tray use.
June 23, 2015
Fixed bug where dragged images remained locked
June, 18, 2015
If you are interested in making a donation, then also please contact me!
This program was written with AutoHotkey.