Announcement

Collapse
No announcement yet.

RESOLVED ImageMagick with layers?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    RESOLVED ImageMagick with layers?

    Hi there,

    I was wondering if anyone knows anything about whether ImageMagick supports layers, because the first time I tried it, the answer seemed to be "sort of".

    What I've been doing is fill out PDF forms in GIMP, then outputting them back to PDF once filled. Using a GIMP plugin to output layers to separate images, I can get the output back to PDF using "convert *.png filled.pdf" in the command line. But then I wondered what would happen if I just tried going straight from the xcf; "convert filled.xcf filled.pdf".

    What actually happened when I attempted it, was that I got a filled.pdf with two pages, which were the same as the last two layers of the XCF. The first four layers were nowhere to be seen, but the fact that it got the last two layers into separate pages, does seem to say that it's capable of going straight from layers to PDF pages, and something's just wrong in this instance.

    Sorry I can't attach files yet, as there's too much personal information in this particular form, but I'll try and follow up with an example. But yeah, does anyone know if ImageMagick actually supports layers? If so, I may be doing something wrong, or just have a particular file it doesn't like or something...

    Cheers,
    Aston

    #2
    Re: ImageMagick with layers?

    Tried it with another XCF and got a 2 page PDF out of a 16 layer XCF, so 2 seems to be the "magick" number...

    Comment


      #3
      Re: ImageMagick with layers?

      Yes.

      A couple of weeks ago I made an animated .gif file out of 215 .jpg photos. That's my only example -- it was a special project and I have not done any further experiments so I can't tell you what else is possible. But the resultant .gif opened in gimp as 215 layers, before I used the animation function.

      BTW, to get the conversion done, I was forced to make a new swap space on my system -- the first iteration of the conversion died after it saturated my 6GB of memory plus 4GB of swap. I added a second 10GB swap space, and then the conversion finished correctly -- this was on an Intel i7 950 running at stock 3GHz. It looked like it used about 14 GB of total memory plus swap at the maximum saturation, watching my conky memory and swap monitor, and it took about 2 hours to run to completion. So, it is a very memory-intensive process.

      Comment


        #4
        Re: ImageMagick with layers?

        Ah yes but, if I understand you correctly, that part's not been an issue for me either. Converting any number of PNG's to a PDF has been fine, it's only going directly from ONE XCF with multiple layers that the resulting PDF has been limited to 2 pages.

        Comment


          #5
          Re: ImageMagick with layers?

          All right, here's a straight-forward example. I made a three layer image in GIMP and saved it as test.xcf. After using "convert test.xcf test.pdf" the output was a PDF with two pages, exactly the same as the bottom two layers in the XCF. The third layer is absent from the PDF.

          http://users.tpg.com.au/dclulow/test.xcf
          http://users.tpg.com.au/dclulow/test.pdf

          I've included the files, but it's easy to recreate, just try converting any XCF with more than two layers to a PDF.

          Comment


            #6
            Re: ImageMagick with layers?

            Ahh it's a known bug, apparently it's XCF ImageMagick doesn't fully support, rather than layers...

            http://www.imagemagick.org/discourse...p=74676#p74676

            I tried saving files to PSD to see if that solved the problem, what happened was I got a PDF which had one page for each layer (correct), except the bottom layer was repeated as a final page in the PDF (so a four layer PSD is output to a PDF which reads Page 1, Page 2, Page 3, Page 4, Page 1).

            It did however, work perfectly when I saved to an animated GIF and converted from that . Of course GIF has colour restrictions, but saving to MNG solves that problem, which solves the issue.

            Comment


              #7
              Re: RESOLVED ImageMagick with layers?

              Nice job researching it, and thanks for posting the information.

              Comment

              Working...
              X