[Toybox] [PATCH] file: parse JPEG files enough to pull out their size in pixels.

scsijon scsijon at lamiaworks.com
Tue Dec 19 17:52:22 PST 2023


On 19/12/23 08:05, toybox-request at lists.landley.net wrote:
>     1. [PATCH] file: parse JPEG files enough to pull out their size
>        in pixels. (enh)
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 17 Dec 2023 16:26:56 -0800
> From: enh <enh at google.com>
> To: toybox <toybox at lists.landley.net>
> Subject: [Toybox] [PATCH] file: parse JPEG files enough to pull out
> 	their size in pixels.
> Message-ID:
> 	<CAJgzZoqp8f72kiX2R5okCURLhnS9tJysURiugmk7irX7VAp3RA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> This doesn't handle refilling toybuf in the case where there's so
> much EXIF data before the header we're looking for that we hit the
> end of toybuf first. (In part because I couldn't decide whether to
> do that or switch to a scheme where we only ever lseek() around,
> reading big-endian shorts.)
> ---

Just wondering if this is going to work with compressed JPEG files or 
are you going to see the compressed size instead?

>   toys/posix/file.c | 20 +++++++++++++++++---
>   1 file changed, 17 insertions(+), 3 deletions(-)
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: 0001-file-parse-JPEG-files-enough-to-pull-out-their-size-.patch
> Type: application/octet-stream
> Size: 2033 bytes
> Desc: not available
> URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20231217/a22282b7/attachment-0001.obj>
>
> ------------------------------

regards and merry christmas to all

scsijon



More information about the Toybox mailing list