LoadImage displaying jpg bug blitz3d blitzplus
Archives Forums/Blitz3D Bug Reports/LoadImage displaying jpg bug blitz3d blitzplus
| ||
| Hello, looks like blitzBasic (3d and +) have a bug in displaying some of jpeg images. Here is the code to show it. ![]()
Graphics 640,480,32,2
SetBuffer BackBuffer()
;Here you can see the bug, the image is not correctly displayed
;the bug is seen after applying the filter
;Comment the next 4 lines and uncomment the other ones to see the difference
Image = LoadImage ("ctrl-a--i102533-notworkincorrectly.jpg")
IX=ImageWidth(Image)
IY=ImageHeight(Image)
DrawBlock image,0,0
;Uncomment following 4 lines (this one displays the correct picture)
;Image = OpenMovie ("ctrl-a--i102533-notworkincorrectly.jpg")
;IX=MovieWidth(Image)
;IY=MovieHeight(Image)
;DrawMovie image,0,0,IX,IY
xa=-1
LockBuffer
For y=-1 To IY
For x=-1 To IX
Xa=Xa+1:If xa=2 Then xa=0
WritePixel x+xa,y+ya, rgb
Next
Next
UnlockBuffer
Flip
WaitKey()
(im using the latest versions of b3d and b+ at the time of writing) Tested on Win8.1 and WinXP(under vmware) Converting the JPG to BMP displays the image correctly. |
| ||
| That's strange, because I'm using Blitz3D, making a voxel engine, and for each block, you have to use jpg textures, and they work fine. PNG don't work though |
| ||
| not every jpg image shows this bug, but this one does. It is one of the images, which show a hidden image when ctrl a is pressed in older versions of Internet explorer. |
