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

From: koneu <koneu93_AT_googlemail.com>
Date: Wed, 16 Jul 2014 17:16:59 +0200

On July 16, 2014 5:05:01 PM CEST, Markus Teich <markus.teich_AT_stusta.mhn.de> wrote:
>Lee Fallat wrote:
>> fseek(filehandle, 0, SEEK_END);
>> height = (ftell(filehandle) / RGBA_CHANNEL_SIZE) / width;
>>
>> Then you allocate your buffer.
>
>Heyho Lee,
>
>This needs FILE* instead of just a file descriptor, making usage in
>pipes
>intractable.
>
>--Markus

fstat() works on file descriptors and you can use it on stdin even if it is a pipe.
Still, storing width _and_ height in the header won't really hurt.
Received on Wed Jul 16 2014 - 17:16:59 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 16 2014 - 17:24:16 CEST