[Implemented] Support of loading JPG images

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] Support of loading JPG images

Post by BackupUser »

Restored from previous forum. Originally posted by Andre.

I would be happy to see, if the LoadImage() and related commands would support loading of JPG pictures.

JPG is the most important gfx format (maybe also PNG, IFF,...) for loading multimedia stuff (landscapes, ...) The now supported BMP files are much to large for using much of them...
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 MrVainSCL.

Hi Andre!

You are sure, BMP are big files but BMP is for easy handling, esp for 3d stuff.. Chunky... :wink: I hope that a PNG, JPG supported lib will standalone, else we have big programs including all kind of graphic formats... :wink:

MrVainSCL!
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 Andre.

Yes you're right!

JPG should be an additional lib. I would need the jpg feature a lot more than BMP. And all game writers would prefer BMP... :wink:

André
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.
Yes you're right!
JPG should be an additional lib. I would need the jpg feature a lot more than BMP. And all game writers would prefer BMP... :wink:
Hm??? I dont understand your wished!?!?!?!?!?

Why dont you use the still supported command:

Result = CatchJPEGSprite(#Sprite, MemoryAddress, JPEGLength, Mode)

The only thing you have to do is to alocate some memory, load the JPG in it and decode it with the above command.

Does it not work?

Tranquilizer/ Secretly!
Registred PureBasic User
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 PB.
I would be happy to see, if the LoadImage() and related commands would support loading of JPG pictures.
That would be cool. In the meantime, you can use the DLL libary at the PureBasic
Resources site to load them, and many other image formats.


PB - Registered PureBasic Coder
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.
You are sure, BMP are big files but BMP is for easy handling, esp for 3d stuff.. Chunky... :wink: I hope that a PNG, JPG supported lib will standalone, else we have big programs including all kind of graphic formats... :wink:
Games already support JPG decoding.. LoadJPGSprite() etc.

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 MrVainSCL.

Hi Fred!

Nice to have the JPEG decoding support... But i still miss this stuff for sound, graphics, sprites... Would be nice to the some commands like the following in the next version of PB :wink:

DecodeSound(#Sprite,?Label)
DecodeSprite(#Sprite,?Label)

Or give us please an example source, how to decode included stuff and use it (maybe a procedure with inline asm)... :wink: I already need those stuff... Keep on ya work...



PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten
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 Danilo.

>DecodeSound(#Sprite,?Label)

Huh?
Convert a Sprite to Sound ??
Thats crazy...

cya,
...Danilo

(registered PureBasic user)
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.

Dont you know this!? Mp3 is out of date! The new SpriteSound Gereration is born.
:-)


Mike

Tranquilizer/ Secretly!
Registred PureBasic User
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 MrVainSCL.

tranquil: *lol* (ups... just a small type mistake! sorry) *fg*

PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten
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 Rings.

Use my Xtraxt-utility to include everything into one file.Its free for use.
And it doesent matter if a bmp is a MByte file coz its compressing into a few Kbytes only.

Siggi
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 FAKEFACTORY.

Back to the topic.. i would appreciate direct JPEG-Loading, because i need the decoded JPEGs as bitmaps for BitBlit and StretchBlit Operations via Win32 API. With JPEG-Sprites i can't do that.

Loading JPEGS with the DLL Library and NViewLib.dll gives me some errors because the unusual dimensions of the Jpegs (1440 x 480)

So i'm in trouble now...


Registered PureBasic Coder
Post Reply