UseJPEGImageDecoder() doesn't work

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Passant.

Please try this code (I have allways graphic-errors)...
You only have to put a jpeg ("test.jpg") in the same path.


InitSprite()
InitKeyboard()
UseJPEGImageDecoder()
OpenScreen (800,600,16,"test")
LoadSprite(0,"test.jpg" ,0)
Repeat
ExamineKeyboard()
FlipBuffers()
DisplaySprite(0,100,100)
Until KeyboardPushed(#PB_Key_Escape)
End
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.
Originally posted by Passant

Please try this code (I have allways graphic-errors)...
You only have to put a jpeg ("test.jpg") in the same path.


InitSprite()
InitKeyboard()
UseJPEGImageDecoder()
OpenScreen (800,600,16,"test")
LoadSprite(0,"test.jpg" ,0)
Repeat
ExamineKeyboard()
FlipBuffers()
DisplaySprite(0,100,100)
Until KeyboardPushed(#PB_Key_Escape)
End
Never thought about that Command. Did you found it in the docs!? Is that an official command?

Mike

Tranquilizer/ Secretly!
http://www.secretly.de
Registred PureBasic User
System: Windows 2000 Server, 512 MB Ram, GeForce4200 TI 128 MB DDR, Hercules Theater 6.1 DTS Sound
System 2: Mobile Pentium 4 2.4GHz 512 MB DDR GeForce4 420-32, Windows XP Home
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by plouf.

YEp i get corrupted images too
i also have problems with all LoadSprite
fuctions but i can determine the exact reason ...

Christos
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ebs.

Passant,

It doesn't work for me either, but using a bit depth of 32 instead of 16 works.

Eric
Originally posted by Passant

Please try this code (I have allways graphic-errors)...
You only have to put a jpeg ("test.jpg") in the same path.


InitSprite()
InitKeyboard()
UseJPEGImageDecoder()
OpenScreen (800,600,16,"test")
LoadSprite(0,"test.jpg" ,0)
Repeat
ExamineKeyboard()
FlipBuffers()
DisplaySprite(0,100,100)
Until KeyboardPushed(#PB_Key_Escape)
End
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kendrel.

tranquil: have you had a look at pb 3.60?! its a new command

and the example also gives me garbage only... image is not displayed correct... i wonder why this didnt happen when the commands were tested...
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kendrel.

it does work for me when you use 32bit mode instead of 16, but then again when i move the mouse ill see my windows mouse cursor and such... i dont think this is supposed to happen huh?!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by LJ.

I am under the impression that the reason your code does not work is that you need DirectX 7 installed on your computer. The JPEG command is part of the libraries that use DirectX 7 or greater installed on the host machine.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Passant.

32 bit-Mode --> That's it
Thank you for your posts
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

LJ: nop, the JPEG command works for Image and Sprite and doesn't requiers DX at all. I've fixed the lib for 16bits mode, get it at: http://www.purebasic.com/update/Sprite
Tell me if it works..

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by LJ.

Fred: You da man!!!
Post Reply