Re: [gentoo-user] OT ghostscript
Peter Eis wrote: Antoine wrote: Hi, Does anyone know why converting a standard a4 pdf to tiffg4 with postscript would give me tiffs of about a1 size? [EMAIL PROTECTED] doc $ gs -dNOPAUSE -dSAFER -sOutputFile=wow.tif -sDEVICE=tiffg4 -dFIXEDMEDIA -sPAPERSIZE=a4 general.pdf quit.ps [EMAIL PROTECTED] doc $ tiffdump wow.tif wow.tif: Magic: 0x4949 Version: 0x2a Directory 0: offset 8 (0x8) next 1740 (0x6cc) SubFileType (254) LONG (4) 1<2> ImageWidth (256) LONG (4) 1<1728> ImageLength (257) LONG (4) 1<2292> BitsPerSample (258) SHORT (3) 1<1> Compression (259) SHORT (3) 1<4> ... Most annoying! I get reasonable values if I set the DPI to 72 (normal size) but I need 300. I guess I need to do some kind of resampling - or do I? to create a tiff mith 300 DPI you could use gs -q -dSAFER -dNOPAUSE -dBATCH -g2480x3508 -r300 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=tiffg4 -sOutputFile=wow.tif a4job.pdf # tiffinfo wow.tif: Image Width: 2480 Image Length: 3508 Resolution: 300, 300 pixels/inch The width and length tell you how many pixel the image contains. Now if you calculate 2480 dots / 8.267717 inch = 299,96 dots/inch 3508 dots / 11.692913 inch = 300,01 dots/inch So if you print the image on a A4 page the resolution is 300 DPI. AFAIK there is no way to tell a TIFF that it has a specific page size. But most imaging programs like gimp for example will also calculate the resulting print size based on the resolution and the pixel dimensions. Thanks, looks like I got myself thoroughly confused here... of course it should be that width and height! Thanks for your help. Cheers Antoine -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] OT ghostscript
Antoine wrote: Hi, Does anyone know why converting a standard a4 pdf to tiffg4 with postscript would give me tiffs of about a1 size? [EMAIL PROTECTED] doc $ gs -dNOPAUSE -dSAFER -sOutputFile=wow.tif -sDEVICE=tiffg4 -dFIXEDMEDIA -sPAPERSIZE=a4 general.pdf quit.ps [EMAIL PROTECTED] doc $ tiffdump wow.tif wow.tif: Magic: 0x4949 Version: 0x2a Directory 0: offset 8 (0x8) next 1740 (0x6cc) SubFileType (254) LONG (4) 1<2> ImageWidth (256) LONG (4) 1<1728> ImageLength (257) LONG (4) 1<2292> BitsPerSample (258) SHORT (3) 1<1> Compression (259) SHORT (3) 1<4> ... Most annoying! I get reasonable values if I set the DPI to 72 (normal size) but I need 300. I guess I need to do some kind of resampling - or do I? to create a tiff mith 300 DPI you could use gs -q -dSAFER -dNOPAUSE -dBATCH -g2480x3508 -r300 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=tiffg4 -sOutputFile=wow.tif a4job.pdf # tiffinfo wow.tif: Image Width: 2480 Image Length: 3508 Resolution: 300, 300 pixels/inch The width and length tell you how many pixel the image contains. Now if you calculate 2480 dots / 8.267717 inch = 299,96 dots/inch 3508 dots / 11.692913 inch = 300,01 dots/inch So if you print the image on a A4 page the resolution is 300 DPI. AFAIK there is no way to tell a TIFF that it has a specific page size. But most imaging programs like gimp for example will also calculate the resulting print size based on the resolution and the pixel dimensions. HTH, Peter Cheers Antoine -- gentoo-user@gentoo.org mailing list -- gentoo-user@gentoo.org mailing list
[gentoo-user] OT ghostscript
Hi, Does anyone know why converting a standard a4 pdf to tiffg4 with postscript would give me tiffs of about a1 size? [EMAIL PROTECTED] doc $ gs -dNOPAUSE -dSAFER -sOutputFile=wow.tif -sDEVICE=tiffg4 -dFIXEDMEDIA -sPAPERSIZE=a4 general.pdf quit.ps [EMAIL PROTECTED] doc $ tiffdump wow.tif wow.tif: Magic: 0x4949 Version: 0x2a Directory 0: offset 8 (0x8) next 1740 (0x6cc) SubFileType (254) LONG (4) 1<2> ImageWidth (256) LONG (4) 1<1728> ImageLength (257) LONG (4) 1<2292> BitsPerSample (258) SHORT (3) 1<1> Compression (259) SHORT (3) 1<4> ... Most annoying! I get reasonable values if I set the DPI to 72 (normal size) but I need 300. I guess I need to do some kind of resampling - or do I? Cheers Antoine -- gentoo-user@gentoo.org mailing list