Sign in to follow this  
barouqeanxiety

question on conversion of files

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this