calculate image size in a2-a6 formats
Posted: 2016-04-30T03:54:42-07:00
Hi all,
Sorry for offtop, this is not imagemagick question, but I wrote here as many people are knowlageble about images sizes and related questions...
I have some kind of image editor written using php/javascript, which is based on fabricjs library (http://fabricjs.com/) and admin, logged to site has to select a2-a6 formats and orientation as portrait / landscape.
Here http://www.papersizes.org/a-sizes-in-pixels.htm I see that size of image depends not only from selected format and orientation, but also from monitor of admin.
Here https://www.sven.de/dpi/ there is DPI Calculator / PPI Calculator, say on my side it is 115.942, as I have laptop 19 inch, Resolution : 1920x1080 pixels
The question is how to calculate width and height of generated image?
That is known that size in mm = pixels * pixels in 1mm.
We can not calculate programmatically ppi value by using javascript... Is it so?
Admin MUST KNOW it... say in image editor show link to dpi/ppi Calculator and admin can get it there and enter this value in.
After admin selected his ppi value by data in http://www.papersizes.org/a-sizes-in-pixels.htm table programm must to select valid width/height in pixels, say as example
a5/portrait for my 115.94 PPI I must get 874 x 1240 pixels, as I need to get right column(3rd column) from range of my ppi. Is it so?
Entering all data template of image with all parameters is saved and image is generated.
Question is if admin reopens this template(maybe on ther device) with generated image has he enter his ppi of this devices and recalculate the image size again?
Thanks for advice!
Sorry for offtop, this is not imagemagick question, but I wrote here as many people are knowlageble about images sizes and related questions...
I have some kind of image editor written using php/javascript, which is based on fabricjs library (http://fabricjs.com/) and admin, logged to site has to select a2-a6 formats and orientation as portrait / landscape.
Here http://www.papersizes.org/a-sizes-in-pixels.htm I see that size of image depends not only from selected format and orientation, but also from monitor of admin.
Here https://www.sven.de/dpi/ there is DPI Calculator / PPI Calculator, say on my side it is 115.942, as I have laptop 19 inch, Resolution : 1920x1080 pixels
The question is how to calculate width and height of generated image?
That is known that size in mm = pixels * pixels in 1mm.
We can not calculate programmatically ppi value by using javascript... Is it so?
Admin MUST KNOW it... say in image editor show link to dpi/ppi Calculator and admin can get it there and enter this value in.
After admin selected his ppi value by data in http://www.papersizes.org/a-sizes-in-pixels.htm table programm must to select valid width/height in pixels, say as example
a5/portrait for my 115.94 PPI I must get 874 x 1240 pixels, as I need to get right column(3rd column) from range of my ppi. Is it so?
Entering all data template of image with all parameters is saved and image is generated.
Question is if admin reopens this template(maybe on ther device) with generated image has he enter his ppi of this devices and recalculate the image size again?
Thanks for advice!