Re: [dev] Looking for simple, alpha supporting image format

From: Lee Fallat <ircsurfer33_AT_gmail.com>
Date: Wed, 16 Jul 2014 10:36:37 -0400

On Wed, Jul 16, 2014 at 10:33 AM, FRIGN <dev_AT_frign.de> wrote:
> On Wed, 16 Jul 2014 10:16:17 -0400
> Lee Fallat <ircsurfer33_AT_gmail.com> wrote:
>
>> I'm with koneu on this one- why make it human readable?
>>
>> I don't think you need to store the height either- just the width.
>> Then just read until EOF and the height will be implicit.
>
> Well, how would we know how large the buffer should be? In case only a
> width is given, you are left to guess and will be forced to realloc
> very often in case it's not enough.
>
fseek(filehandle, 0, SEEK_END);
height = (ftell(filehandle) / RGBA_CHANNEL_SIZE) / width;

Then you allocate your buffer.

>> Honestly I'm surprised the header is just not [width] and nothing
>> else. Sure, if the file ever gets lost in deletion space it'll never
>> be recoverable, but that'll teach people not to remove files with so
>> much haste :)
>
> I would have no problem with just having "pic" at the beginning of the
> file (or any other name we might come up with).
>
Why, what's the purpose of this?
Received on Wed Jul 16 2014 - 16:36:37 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 16 2014 - 16:48:08 CEST