Archived

This topic is now archived and is closed to further replies.

HalfLucifer

Offtopic - how to convert RAW to TGA in Photoshop?

Recommended Posts

I wish I could convert the RAW images to TGA in Photoshop6. I tried to use "Save As" to save RAW as TGA extension, but that did not work because it could not be loaded by Nehe''s TGA tut. Neither BMP or JPG could properly convert to TGA images. Could someone teach me how to properly convert different image formats each other in Photoshop6? That would be a great help to me. Thanks.

Share this post


Link to post
Share on other sites
I got it to work alright. Here''s what you''ll need to do...

Load in the RAW as a 1024x1024.
Then go to Image-->Mode-->RGB.
Then do a Save As a TGA file with 24 bits/pixel.

It should then load.

~ Dragonus

Share this post


Link to post
Share on other sites
Thanks for your reply!
However, I got another problem. I wonder why I can''t save TGA as 8-bit image?
I''ve ever seen someone using 8-bit TGA images in program,
but I just can''t find the option to save it to 8-bit image in Photoshop.
The reason to do this is because I''d like to convert RAW to TGA for heightmap usage.
I think RAW got a too large size to be a good image format, thus I''d like to convert it to 8-bit TGA for heightmap usage.

Share this post


Link to post
Share on other sites
Actually, you remember when you couldn''t load it into Nehe''s program? That was an 8-bit image.

8-bit TGAs are flat out greyscale. It''s identical conceptually to an alpha channel, since the alpha channel is "greyscaled" as well. Colour images require 24 bits for RGB (BGR?) or 32 bits for RGBA (BGRA? ).

If you do an 8-bit function though, you''ll have to make your own, as Nehe''s doesn''t take them. Just a guess (haven''t tried it, but it should work ), but your code will look like a cross between his loadRAW() and loadTGA() functions. You''ll have to have the header stuff from the TGA function, though replace the "2" in the {0,0,2,0,0,0,0,0,0,0,0,0} line with a "3" for greyscale mode. Then, you''ll load each byte is as you would a RAW image.

Hope that helps you out.

~ Dragonus

Share this post


Link to post
Share on other sites