Re: Writing several images into a single binary file
- From: Giff <giffnews@xxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Aug 2007 12:24:50 +0200
Logan Shaw wrote:
There is no way this can ever possibly work reliably. The pixel data
is arbitrary data and can include any arbitrary sequence of bytes.
OK, I was slowly getting convinced of this too.
I would use a library that already knows how to read and write a standard
image format.
Is there a library that allows you to write several images in the same file? images with pixels of 32 bits?
But if for some reason you have a compelling reason to invent your own
format, you are already storing the width in pixels of the first image,
so based on that data, you should be able to compute the offset to
the next image without relying on an inherently unreliable method like
looking for newlines.
Well I tried and it didn't work, but I'll give it another try. Would you suggest to read one image at the time from the file or, instead, read everything in a single buffer and then extract the images from there? The total size of the file usually ends up between one and two megabytes.
Thanks.
G
.
- Follow-Ups:
- Re: Writing several images into a single binary file
- From: [Jongware]
- Re: Writing several images into a single binary file
- References:
- Writing several images into a single binary file
- From: Giff
- Re: Writing several images into a single binary file
- From: Logan Shaw
- Writing several images into a single binary file
- Prev by Date: Re: New language idea - you guys have any feedback?
- Next by Date: Re: Writing several images into a single binary file
- Previous by thread: Re: Writing several images into a single binary file
- Next by thread: Re: Writing several images into a single binary file
- Index(es):
Relevant Pages
|