News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

masm pictures not getting recognized radasm

Started by stonelightning, December 07, 2023, 10:47:30 AM

Previous topic - Next topic

stonelightning

Good Night!

I came across the issue that i only can import .bmp files when i convert .png to .bmp over paint,
which heavily decreases quality.
When i use some online converter the picture box in radasm wont recognize the bmp file.
I assume its the size?

I will try more tomorrow, maybe you guys have an idea!

jj2007

Quote from: stonelightning on December 07, 2023, 10:47:30 AMconvert .png to .bmp over paint, which heavily decreases quality

That should be a lossless conversion. Can you demonstrate this loss of quality?

stoo23


jj2007

I've hacked together an image converter for you:

GuiParas equ "Image converter", w700, h700, b LiteBlueGreen, m0
include \masm32\MasmBasic\Res\MbGui.asm
GuiControl MyCanvas, "canvas"
Event CanvasPaint
  GuiImage CL$(), fit
GuiEnd

Just drag an image over the executable, then right click and save e.g. as test.bmp :cool:

stoo23

OH !!  :biggrin:  :cool:  well there you go, just like that  :joking:
I might be wrong but I was thinking it may have been Transparent or Alpha channel related issues upsetting the conversion to bmp
I know Gimp has issues doing that conversion.

TimoVJL

Can we see that png, that don't convert well to bitmap.
You can use Irfanview for tests.

Also a small program to test GdiPlus for it :
Usage:
GdiPlusPng2Bmp.exe SMenu1.png SMenu1.bmp
May the source be with you

stonelightning

It's with every image  :dazzled:






Quote from: jj2007 on December 07, 2023, 12:50:31 PMI've hacked together an image converter for you:

GuiParas equ "Image converter", w700, h700, b LiteBlueGreen, m0
include \masm32\MasmBasic\Res\MbGui.asm
GuiControl MyCanvas, "canvas"
Event CanvasPaint
  GuiImage CL$(), fit
GuiEnd

Just drag an image over the executable, then right click and save e.g. as test.bmp :cool:
Nice! Thats cool  :cool:

Ty all for the help !

stoo23

I might be Wrong, but that looks like a Colour 'Bit Depth' issue.

TimoVJL

May the source be with you

stoo23

Good old Irfanview :) was Always a good program  :thumbsup:

Just for the 'heck of it' I used Paint to create a 256 bit depth conversion and it sure looks to be doing the same 



Why it Won't recognize the file, is another thing altogether that greater minds than I (and those familiar with RadAsm), may be able to help with  :smiley:



stonelightning

Quote from: stoo23 on December 08, 2023, 09:24:54 AMGood old Irfanview :) was Always a good program  :thumbsup:

Just for the 'heck of it' I used Paint to create a 256 bit depth conversion and it sure looks to be doing the same 



Why it Won't recognize the file, is another thing altogether that greater minds than I (and those familiar with RadAsm), may be able to help with  :smiley:



After i converted from paint i had no problems the picture just looked bad.
i will try irfanview asap :cool:

jj2007

Quote from: stonelightning on December 08, 2023, 08:32:04 AMIt's with every image  :dazzled:

Processed with my ImageConverter.exe, see reply #3:


Which software did you use that gave you the distorted image?

Greenhorn

See picture ...

Due to file size limitation for upload I had to use a filehoster.

EDIT: My web.de mailer is defect ?!

However, I used Pixelformer and does the job ...

Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

NoCforMe

I saved your image and converted it with my go-to paint program, Paint Shop Pro. Converted to 256-color image, saved as original PNG (and as a BMP which I couldn't upload). No degradation visible. You just need to use the right tool, apparently.

(It did strip the alpha-channel data from the image, and told me so, but you can see that it looks almost as good as the original.)
Assembly language programming should be fun. That's why I do it.

stonelightning

Quote from: jj2007 on December 08, 2023, 09:55:03 AM
Quote from: stonelightning on December 08, 2023, 08:32:04 AMIt's with every image  :dazzled:

Processed with my ImageConverter.exe, see reply #3:


Which software did you use that gave you the distorted image?
normal paint in windows 11