Page 1 of 1

Posted: 2006-09-13T14:39:28-07:00
by magick
The bug is in IE. Upgrade to IE 6 (or is it 7) Beta and it will render your PNG images correctly.

Posted: 2006-09-13T16:47:48-07:00
by glennrp
magick wrote: The bug is in IE. Upgrade to IE 6 (or is it 7) Beta and it will render your PNG images correctly.

IE7rc1 will render the PNG transparency correctly. There's still a problem with gamma, that is solved by using the PNG sRGB chunk without a gAMA chunk.

Posted: 2006-09-13T19:18:15-07:00
by anthony
When converting from PDF or PS formats IM uses Ghostscript. Unfortunatally it needs help when you want to preserve transparency from such file formats...

See the recent forum note for postscript...
Converting EPS to transparent GIF part 3
http://redux.imagemagick.org/discussion ... php?t=7366

For full details and solutions.

Posted: 2006-09-13T21:15:11-07:00
by anthony
Looking in the delgates.xml file, It looks like PDF is converted to PS then PS is converted to images.

Posted: 2006-09-16T05:46:10-07:00
by anthony
While I have not had the 'pleasure' (sic) of modifing delegate code, though I plan to for the documenting of IM examples, that does NOT look right to me.

The previous code generated 'eps' which is what the delegate declares will be returned.
The new one returns a transparent alpha, but still declares it generated 'eps'.

I suggest you check it and update.

Posted: 2006-09-17T02:46:40-07:00
by anthony
With "type.xml" in your home ".magick" sub-directoyr you can append your own fonts to the system font list, I would like to know if you can do the same, or even override the system version using a "delegate.xml" in that same home sub-directory.

Christy can you help shead light on this?

Posted: 2006-09-17T15:53:07-07:00
by magick
For security reasons you cannot override the system installed ImageMagick delegates. You can add unique delegates in ~/.magick/delegates.mgk but any duplicate delegates are ignored.

Posted: 2006-09-17T18:59:25-07:00
by anthony
Thanks Chrisy.

How does IM determine if a delegate is unique, and how does it pick between
say a "pdf -> png" and the system "pdf -> eps" delegates?

Eg will adding a "pdf -> png" delegate cause it to be used as it is more direct?

Can you specify 'alturnate' input/output format delegates?

For example can we specify a delegate to decode a "pdf2png" format image EG:

Code: Select all

<delegate decode="pdf2png" encode="png" mode="bi" command=""gs" -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -sDEVICE="pngalpha" -sOutputFile="%o" -f"%i"" />
in your personal "delegates.mgk" file then use...

Code: Select all

  convert  -density 300x300  pdf2png:file.pdf ...
to use your own delgate method?

WARNING: delegate does not pass any "density" settings to ghostscript!!!!

If this works then "Tonytt98" can create his own delegates, seperate to the system degegates and will not need to effect other users on the system.

I will add this to the IM examples 'Image File Handimg' section, if I can get verification that it works.

Posted: 2006-09-21T07:27:16-07:00
by magick
If you need to have different delegates than what is installed on the system, the only current solution is to install your own private version of ImageMagick that will pick up your delegate.xml file rather than the system version.

Posted: 2006-09-21T18:51:05-07:00
by anthony
That is not what he refered it. Look at my last post above (end of page 1) about adding a new delegate for a "pdf2png" input image type. I'd like to know myself for IM Examples.

Posted: 2006-09-21T19:26:43-07:00
by magick
ImageMagick only consults the delegates if the image format is not supported internally. Since PDF is, ImageMagick would never fire the png2pdf delegate. However, you could override this behavior with an an explicit custom tag. Lets declare a new image format called custom. First we edit delegates.xml and add
  • <delegate decode="custom" command='"pdf2png" "%i" "%o"' />
To activate, use this command:
  • convert custom:image.pdf image.tif
for example. Note we have not tested this so if it fails for some reason, post here and we'll take a closer look at the problem.

Posted: 2006-09-21T19:46:35-07:00
by anthony
Thank you, that was what I was asking.
<delegate decode="pdf2png" ....>
then
convert pdf2png:image.pdf ....

Posted: 2006-09-21T21:07:29-07:00
by anthony
The above should work and you should be able to add it to your personal delegates.xml file in your home. It should not interfer with the system delegates as you finded a new 'input image format' called "pdf2png".

If this does not work we have a bug.

NOTE: the above does not pass any density or resolution options to GS, it is an example only at this point.

let us know how it goes.

Posted: 2006-09-21T21:12:06-07:00
by magick
The PDF/PS delegates are in a special format used internally. For PDF we use the ps:color delagate rather than ps:alpha because the pngalpha device only supports one page/one image and PDF's generally are multi-page and ImageMagick requires the delagate to return a multi-frame image format. If you use pdf2png you would need to concatenate all the PNG images into a multi-image format such as MNG, MIFF, TIFF, etc. For an example, see the pov delagate. You might be better off using Ghostscript directly and bypassing ImageMagick if you are attempting to get transparent PDF images.