![]() this is a TIFF file in CMYK format with a 96 DPI resolution MagickSetImageUnits($mgck_wnd, MW_PixelsPerInchResolution) MagickSetImageResolution($mgck_wnd, 300, 300) If($x_res = 300 & $y_res = 300 & $img_units = MW_PixelsPerInchResolution) List($x_res, $y_res) = MagickGetImageResolution($mgck_wnd) Įcho "$file x_res=$x_res $units - y_res=$y_res $units" $img_units = MagickGetImageUnits($mgck_wnd) Ĭase MW_UndefinedResolution: $units= 'undefined' break Ĭase MW_PixelsPerInchResolution: $units= 'PPI' break Ĭase MW_PixelsPerCentimeterResolution: $units= 'PPcm' break MagickWriteImage($mgck_wnd, str_replace('.tif', '.jpg', $file)) $img_colspc = MagickGetImageColorspace($mgck_wnd) MagickWriteImage($mgck_wnd, str_replace('.', '-rgb.', $file)) MagickSetImageColorspace($mgck_wnd, MW_RGBColorspace) set image resolution to 300 DPIs (doesn't change image size in pixels) " Here are example functions using ImageMagick extension: JPEG files may have RGB or CMYK color space TIFF files may have RGB or CMYK color space When converting from TIFF to JPEG, you must also convert from CMYK color space to RGB color space as IE can't show CMYK JPGs either. For Windows users it includes a PHP extension php_magickwand_st.dll (and yes, it runs under PHP 5.0.4). ImageMagick ( ) is a free software that can read, convert and write images in a large variety of formats. ![]() IE doesn't show TIFF files and standard PHP distribution doesn't support converting to/from TIFF. ![]() In the forum at the following comment is written: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |