Jump to content
  • Advertisement
Sign in to follow this  
barouqeanxiety

question on conversion of files

This topic is 3797 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

so lets say I want to take...say a jpg and convert it to my own image format of my own making...for encryption purposes perhaps. How would I find out how other formats are laid out data wise, how would I read this data, and then save it as my own type. Is it as simple as loading the file with fstream and then temporarily store it to save it to my own. or is there more involved. any tuts on this topic? alot of questions i know...for simplicity sake: 1.How would I find out how other formats are laid out data wise 2.how would I read this data 3.save it as my own type? 4.Is it as simple as loading the file with fstream and then temporarily store it to save it to my own? 5.is there more involved? 6.any tuts on this topic?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by barouqeanxiety
so lets say I want to take...say a jpg and convert it to my own image format of my own making...for encryption purposes perhaps. How would I find out how other formats are laid out data wise, how would I read this data, and then save it as my own type. Is it as simple as loading the file with fstream and then temporarily store it to save it to my own. or is there more involved. any tuts on this topic? alot of questions i know...for simplicity sake:

1.How would I find out how other formats are laid out data wise
2.how would I read this data
3.save it as my own type?
4.Is it as simple as loading the file with fstream and then temporarily store it to save it to my own?
5.is there more involved?
6.any tuts on this topic?


If you wish to simply encrypt the file (presumably to prevent tampering) then you can simply encrypt the file, the process of which is the same regardless of the type of file. Then when you want to read the file you'd decrypt it and use it then.

However, if you really did wish to read jpeg files and convert them to your own you would need to learn the file format. I recommend here at Wotsit.org.

On the OTHER hand, there are probably libraries that already do this kind of thing for you. Here's some search results to get you started.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!