Outputting 32 bit JPG image.
Posted: Sun Jun 02, 2024 7:09 pm
This program outputs an image, that windows reports to have a bit depth of 24.
Should it not output a 32 bit image?
Should it not output a 32 bit image?
Code: Select all
#width=1000
#height=1000
OpenWindow(0,100,0,#width,#height,"Window")
CreateImage(0,#width,#height,32)
Debug ImageDepth(0)
ImageGadget(0,0,0,#width,#height,ImageID(0))
StartDrawing(ImageOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
UseJPEGImageEncoder()
Box(100,100,800,800,RGBA(255,255,255,120))
StopDrawing()
SetGadgetState(0,ImageID(0))
Delay(40)
If Not SaveImage(0,"bitdepthtest.jpg", #PB_ImagePlugin_JPEG,99,32)
MessageRequester("Error","File has not been saved correctly",#PB_MessageRequester_Ok)
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow