Page 1 of 1

Converting SVG to BMP for Launch4J used to work......

Posted: 2014-07-22T06:03:25-07:00
by Plasma
Ok so we had an old server that was working fine, but it died. We have built a new server with ImageMagick 6.8.9 and we are now having issues.

We have a script that runs to update the splash screen on a Java Application at build time using the following command ...

Code: Select all

convert -font dejavu-sans-book -draw "text 123,75 'Version: 6.2.0'" -draw "text 125,90 'Build 594'" +matte splash.svg splash.bmp
This produces an image from the Splash.svg and adds the current version and build number to it. We then attempt to use this file as a splash image in Launch4J. Since we upgraded the ImageMagick this image is no longer acceptable to launch 4J and it errors when trying to display it. I have no idea what version of ImageMagick was on the old server.

If I take the output of ImageMagick and open it in say MSPaint/PSP, make a change, save it then undo the change and re-save it the image works fine in Launch4J.
Comparing the "identify -verbose" outputs of the two images the only difference I can see is after the save in MSPaint there is an extra attribute in the output ..

"Gamma: 0.454545"

Not sure if I can attach files on the forum but once I've opened this topic I will attempt to upload a broken and a working one.

**EDIT** I have uploaded a ZIP with two .bmp's and a .txt for each with the output from Identify.- https://mega.co.nz/#!2dtjQaRD!Fyt-IAWgk ... rlPjngpv58

Any help in getting this working again would be greatly appreciated. I need to get it working direct from ImageMagick again so we can automate the build process. Currently I have to manually edit the image and build a new .exe with Launch4J. I'm also going to post on the Launch4J forum in case they know of a work around.

Plasma

Re: Converting SVG to BMP for Launch4J used to work......

Posted: 2014-07-22T06:18:03-07:00
by snibgo
You can upload files to dropbox.com or similar, and paste the URLs here.

Please provide splash.svg, as well as old and new results.

The command order is wrong for current IM. The input file splash.svg should come before the processing.

Please say what your platform is.

Another question is what renders your SVG. Please paste the text output that comes from:

Code: Select all

convert -verbose splash.svg -font dejavu-sans-book -draw "text 123,75 'Version: 6.2.0'" -draw "text 125,90 'Build 594'" +matte splash.bmp
BMP file formats are fairly weird. Png may be better, or prefix the output with "BMP2:" or "BMP3:".

Re: Converting SVG to BMP for Launch4J used to work......

Posted: 2014-07-22T07:28:18-07:00
by snibgo
You have provided working.bmp and broken.bmp. They both look fine to me. I don't know Launch4J wants.

You might start very simple.

Code: Select all

convert -size 445x222 out.png
Perhaps Launch4J wants out.bmp, or "BMP2:out.bmp" or something.

Re: Converting SVG to BMP for Launch4J used to work......

Posted: 2014-07-23T02:37:03-07:00
by Plasma
I added BMP2: to the final parameter and the output BMP is now acceptable by Launch4J.

Thank you very much for your time and suggestions! :)

Plasma