Page 1 of 1

[solved] convert to .pdf keeps file type

Posted: 2012-11-19T06:53:38-07:00
by qubodup
I can't convert .png to .pdf.

Code: Select all

$ convert a.png b.png c.pdf
$ identify a.png b.png c.pdf 
a.png PNG 1274x1749 1274x1749+0+0 8-bit sRGB 2c 17.3KB 0.000u 0:00.000
b.png[1] PNG 1128x1666 1128x1666+0+0 8-bit sRGB 2c 26.5KB 0.000u 0:00.000
c.pdf[2] PNG 1274x1749 1274x1749+0+0 8-bit sRGB 2c 18.2KB 0.000u 0:00.000
If I convert the png files to non-2c space in GIMP, before converting, this doesn't change the behavior:

Code: Select all

$ identify a.png b.png c.pdf 
a.png PNG 1274x1749 1274x1749+0+0 8-bit sRGB 40.1KB 0.000u 0:00.000
b.png[1] PNG 1128x1666 1128x1666+0+0 8-bit sRGB 57.9KB 0.000u 0:00.000
c.pdf[2] PNG 1274x1749 1274x1749+0+0 8-bit sRGB 2c 18.2KB 0.000u 0:00.000
If I convert the png files to .jpg via convert before converting to pdf, the output is also jpg:

Code: Select all

$ identify a.jpg b.jpg c.pdf 
a.jpg JPEG 1274x1749 1274x1749+0+0 8-bit sRGB 201KB 0.000u 0:00.000
b.jpg[1] JPEG 1128x1666 1128x1666+0+0 8-bit sRGB 325KB 0.000u 0:00.000
c.pdf[2] JPEG 1274x1749 1274x1749+0+0 8-bit sRGB 201KB 0.000u 0:00.000
This seems to be unrelated to the multi-page setup:

Code: Select all

$ convert a.png a.pdf
$ identify a.png a.pdf
a.png[2] PNG 1274x1749 1274x1749+0+0 8-bit sRGB 40.1KB 0.000u 0:00.000
a.pdf[1] PNG 1274x1749 1274x1749+0+0 8-bit sRGB 2c 18.2KB 0.000u 0:00.000
Arch Linux 64bit
Version: ImageMagick 6.8.0-3 2012-10-27 Q16 http://www.imagemagick.org

Re: convert to .pdf keeps file type

Posted: 2012-11-19T10:35:54-07:00
by fmw42
same for me on IM 6.8.0.4 Q16 Mac OSX Snow Leopard


convert logo: logo1.png
convert logo: logo2.png
convert logo1.png logo2.png logo.pdf

identify logo1.png logo2.png logo.pdf

logo1.png PNG 640x480 640x480+0+0 8-bit sRGB 256c 27.4KB 0.000u 0:00.000
logo2.png[1] PNG 640x480 640x480+0+0 8-bit sRGB 256c 27.4KB 0.000u 0:00.000
logo.pdf[2] PNG 640x480 640x480+0+0 8-bit sRGB 256c 27.4KB 0.010u 0:00.000

identify -verbose logo.pdf
Image: logo.pdf
Format: PNG (Portable Network Graphics)
Class: PseudoClass
Geometry: 640x480+0+0
Units: Undefined
Type: Palette
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit

Re: convert to .pdf keeps file type

Posted: 2012-11-22T14:04:33-07:00
by qubodup
Today, it all works.
Version: ImageMagick 6.8.0-3 2012-10-27 Q16 http://www.imagemagick.org

So strange. Was a dependency broken? Here's the list of what I updated since I last tried.

Code: Select all

[2012-11-19 14:45] upgraded ldns (1.6.14-1 -> 1.6.16-1)
[2012-11-19 14:45] upgraded libcap-ng (0.7-1 -> 0.7.3-1)
[2012-11-19 14:45] upgraded openssh (6.1p1-3 -> 6.1p1-4)
[2012-11-22 15:06] upgraded cronie (1.4.8-3 -> 1.4.8-4)
[2012-11-22 15:06] upgraded firefox (16.0.2-1 -> 17.0-1)
[2012-11-22 15:06] upgraded harfbuzz (0.9.5-2 -> 0.9.6-1)
[2012-11-22 15:06] upgraded logrotate (3.8.2-1 -> 3.8.2-2)
[2012-11-22 15:06] upgraded lv2 (1.0.0-2 -> 1.2.0-1)
[2012-11-22 15:06] upgraded opencv (2.4.3-2 -> 2.4.3-3)
[2012-11-22 15:06] upgraded playonlinux (4.1.8-1 -> 4.1.8-2)
[2012-11-22 15:06] upgraded qjson (0.7.1-2 -> 0.8.0-1)
[2012-11-22 15:06] upgraded shadow (4.1.5.1-1 -> 4.1.5.1-2)
[2012-11-22 15:06] upgraded vi (1:050325-2 -> 1:050325-3)

Re: [solved] convert to .pdf keeps file type

Posted: 2012-11-22T14:16:01-07:00
by fmw42
I still get PNG rather than PDF on IM 6.8.0.5 Q16 Mac OSX Snow Leopard


convert logo: logo1.png
convert logo: logo2.png
convert logo1.png logo2.png logo.pdf
identify logo1.png logo2.png logo.pdf
logo1.png PNG 640x480 640x480+0+0 8-bit sRGB 256c 27.4KB 0.000u 0:00.000
logo2.png[1] PNG 640x480 640x480+0+0 8-bit sRGB 256c 27.4KB 0.000u 0:00.000
logo.pdf[2] PNG 640x480 640x480+0+0 8-bit sRGB 256c 27.4KB 0.000u 0:00.000



identify logo.pdf
logo.pdf PNG 640x480 640x480+0+0 8-bit sRGB 256c 27.4KB 0.000u 0:00.000