lee321987 Posted October 1 Share Posted October 1 Hello. Attached are two images converted from the same source image. One created by Directory Opus and the other created by ImageMagick. The ImageMagick image will not display in an AutoIt GUI, but those created by other programs work fine (I also tried GIMP and IrfanView converts). Any idea what's wrong? My ImageMagick command line: convert.exe "C:\Program Files (x86)\AutoIt3\Examples\GUI\mslogo.jpg" "imagemagick_convert.bmp" Example code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("My GUI picture", 350, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU) Local $idPic = GUICtrlCreatePic("DOpus_convert.bmp", 50, 50, 200, 50) Local $idPic2 = GUICtrlCreatePic("imagemagick_convert.bmp", 50, 120, 200, 50) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() DOpus_convert.bmp imagemagick_convert.bmp Link to comment Share on other sites More sharing options...
Solution ioa747 Posted October 1 Solution Share Posted October 1 from: https://usage.imagemagick.org/formats/#bmp If you have an older program cannot read the default BMP4 images written by ImageMagick, (for example a Windows Background Image), you can enforce the generation of a BMP3 format image using... magick image BMP3:image.bmp This format should have no transparency and should be a 'printable image', whatever that means. In other words 'Windows' compatible. However, if a PNG input file was used and it contains a gAMA and cHRM chunk (gamma and chromaticity information) either of which forces "magick" to write a BMP4. To get a BMP3 you need to get rid of that information. One way may be to pipeline the image though a minimal 'image data only' image file format like PPM and then re-save as BMP3. Messy, but it should work. magick image.png ppm:- | magick - BMP3:image.bpm lee321987 1 I know that I know nothing Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now