Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea? - Mailing list pgsql-general

From Adam Brusselback
Subject Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?
Date
Msg-id CAMjNa7egZo+1H6ztc6OjyeKupkEaxO8ppRmoecj+=SwCNwQ5ng@mail.gmail.com
Whole thread Raw
In response to easy way to acquire height / width from images (PNG, JPEG) stored asbytea?  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Responses Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?
List pgsql-general
Why not extract and store that metadata with the image rather than trying to extract it to filter on at query time? That way you can index your height and width columns to speed up that filtering if necessary.

You may be able to write a wrapper for a command line tool like imagemagic or something so you can call that from a function to determine the size if you did want to stick with extracting that at query time.

pgsql-general by date:

Previous
From: Achilleas Mantzios
Date:
Subject: easy way to acquire height / width from images (PNG, JPEG) stored asbytea?
Next
From: Ted Toth
Date:
Subject: Re: performance of first exec of prepared statement