fix spngload default ppm
This commit is contained in:
parent
f7e8db599d
commit
36ac84ee6f
|
@ -198,8 +198,8 @@ vips_foreign_load_png_set_header( VipsForeignLoadPng *png, VipsImage *image )
|
|||
|
||||
/* Get resolution. Default to 72 pixels per inch.
|
||||
*/
|
||||
xres = (72.0 / 2.54 * 100.0);
|
||||
yres = (72.0 / 2.54 * 100.0);
|
||||
xres = 72.0 / 25.4;
|
||||
yres = 72.0 / 25.4;
|
||||
if( !spng_get_phys( png->ctx, &phys ) ) {
|
||||
/* unit 1 means pixels per metre, otherwise unspecified.
|
||||
*/
|
||||
|
|
|
@ -461,8 +461,8 @@ png2vips_header( Read *read, VipsImage *out )
|
|||
/* Get resolution. Default to 72 pixels per inch, the usual png value.
|
||||
*/
|
||||
unit_type = PNG_RESOLUTION_METER;
|
||||
res_x = (72 / 2.54 * 100);
|
||||
res_y = (72 / 2.54 * 100);
|
||||
res_x = 72.0 / 2.54 * 100.0;
|
||||
res_y = 72.0 / 2.54 * 100.0;
|
||||
png_get_pHYs( read->pPng, read->pInfo, &res_x, &res_y, &unit_type );
|
||||
switch( unit_type ) {
|
||||
case PNG_RESOLUTION_METER:
|
||||
|
|
Loading…
Reference in New Issue