ZiNgA BuRgA
Smart Alternative
Posts: 17,022.2988 Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
|
RE: [Application Release] Sounge v1.0
Kaiser Wrote:as for the compressor, im working on it... but the problem is that when i rename the file to raw format, it doesn't have the image dimensions (obviously), and im having a hard time embedding that information into the raw image's metadata... yet again, i don't really know how... :P
Read it in as a BMP. Stick any appropriate image dimension (a 1x? could work, or you could try making some factorizing algorithm).
There's extensive documentation on the BMP format (it's just a header+palette(if necessary)+image data).
Kaiser Wrote:speaking of that, zinga, do you know how can i retrieve the filesize of a file in c++?? ive been looking around to no avail T_T
IDK about a pure C/C++ implementation. I've seen people use fseek() to the end of the file, then ftell() to get the location (ie the filesize). I haven't programmed in C/C++ much, so I can't recommend much.
If you don't mind going into the Windows API, there's the GetFileSize function (note, if you do this, you restrict your code to only be compiled for Windows).
|
|
14/05/2008 06:11 PM |
|