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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Plasma
Posts: 2
Joined: 2014-07-22T05:46:43-07:00
Authentication code: 6789

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

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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:".
snibgo's IM pages: im.snibgo.com
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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.
snibgo's IM pages: im.snibgo.com
Plasma
Posts: 2
Joined: 2014-07-22T05:46:43-07:00
Authentication code: 6789

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

Post 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
Post Reply