🔒 Locked
loading picures - need help!!
Advertisement
Original Post
How can I load a picture .jp2 or .jpc format?
They are too popular and too big.
TGA Too big? it has RLE compression! And JPEG is a compressed format! what are you writing for a floppy drive?

Sharp Basic - Coming summer 2004!
Sign Up For Sharp Basic Beta Testing!!!

Sharp Basic - Coming summer 2004!
Sign Up For Sharp Basic Beta Testing!!!
jpg has worse quality and is bigger than jp2 or jpc
yes but I need without compression, by the way are there good web sites where I can learn loading TGA''s with RLE compression
You mean e-mail NeHe?
nehe.gamedev.net -> tutorials.
--
You''re Welcome,
Rick Wong
- Google | Google for GameDev.net | GameDev.net''s DirectX FAQ. (not as cool as the Graphics and Theory FAQ)
--
You''re Welcome,
Rick Wong
- Google | Google for GameDev.net | GameDev.net''s DirectX FAQ. (not as cool as the Graphics and Theory FAQ)
Thanks! But I still don''t know how to load pictures in jp2 or jpc format. In big pictures like 640x480 jpg is a lot smaller, but for my program I need small pictures 64x64 and jp2 and jpc are a little bit smaller than jpg without losing quality. Jpg loses quality in 64x64 pictures!
Sorry for my english, I''m polish.
Sorry for my english, I''m polish.
So let me see if I am geting this right - You want to spend somthing like 4-6 h to find, learn, and write a code for loading jp2 for "64x64" images ????
O_o
You are bether with TGA's & RLE - wich is losles compresion (if you don't know) + there is perfectly good tutorial on NeHe site with source code.
Lik the other dude said what are you writing for a floppy drive?

[edited by - Red Drake on June 12, 2004 3:32:41 PM]
O_o
You are bether with TGA's & RLE - wich is losles compresion (if you don't know) + there is perfectly good tutorial on NeHe site with source code.
Lik the other dude said what are you writing for a floppy drive?
[edited by - Red Drake on June 12, 2004 3:32:41 PM]
Nice joke, but I''d say that the NeHe tutorial 33 is a little bit too hard to understand and the loading of jp2 or jpc might be easier (I hope). And also it could be a challenge.
If you set your graphics program correctly, you should be able to compress JPGs with no quality loss. For example, if you have The GIMP (www.gimp.org -- a free image editor), then all you have to do is File->Save As and enter filename.jpg, and put the quality slider all the way to the right. You can achieve lossless compression this way. And besides, what''s 10 KB extra on all your graphics combined?
-- Fyhuang, president, Altitude Technologies
Altitude Technologies: http://www.hytetech.com/altitude
Altitude Forums: http://s8.invisionfree.com/Altitude_Forums/
-- Fyhuang, president, Altitude Technologies
Altitude Technologies: http://www.hytetech.com/altitude
Altitude Forums: http://s8.invisionfree.com/Altitude_Forums/
Yes I know The GIMP, but on every picture I save about 10KB and I have a lot of pictures. The program with all data should not be bigger than 2 MB. And to what you said with my pictures(textures) even if you choose quality 100 in jpg it''s still worse than in jp2 or jpc.
quote:
Original post by sir_wojciech
Nice joke, but I''d say that the NeHe tutorial 33 is a little bit too hard to understand and the loading of jp2 or jpc might be easier (I hope). And also it could be a challenge.
It''s not hard - hear let me give you a lithel direction to start
at the begining of the file you hawe the header
then you hawe a chunk header that is an unsigned char
this is actualy the compresion - if the header is negative then you load the chunk header (chunk header in positiv) number of pixels. If the chunk header is positiv then you read the one pixel afther header and store it in memory for the number of value in chunk header.
After you load a header and the pixels it tels you to load you yust read another header.
Don''t know if this is ok - or is it the reversed (negative and positive header) - I wroute my lib that does this 3 month''s ago
This is like i write text
"THIS IS RLE COMPRESION ! COOLLLLLLLLLL"
And then instead of writeing all that i write
"-22 THIS IS RLE COMPRESION ! C 2xO 10xL"
If you don''t understand this you can yust extract the code from tutorial
Sory about the yoke - it''s yous that loading an jp2 format woud be about 10 times harder then TGA
I''m learning OpenGL only for two months and the stuff about RLE is a bit too complicated for me.
quote:
Original post by sir_wojciech
I''m learning OpenGL only for two months and the stuff about RLE is a bit too complicated for me.
I learnd RLE yust after i learnd TGA and that was after learning texture maping & trinagles
It''s not hard and if you can''t learn it well -you will hawe about 10-15 h yust understanding *.jp2 - I mean do you know what kind of algoritams are behind the compresions in jpg jp2 ... ???
As I said at the first post - use ImageLibrary if you use dev-cpp 5 you can download them by using update checker ("Tools-> Check for updates").
Realy I am not trying to get at you hear, It''s yust that RLE is the simplest compresion there is
O.K. I understand, but how old were you when you started learning OpenGL?
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement