Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?

Поиск
Список
Период
Сортировка
От Achilleas Mantzios
Тема Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?
Дата
Msg-id 96fadd6d-d7f9-4365-d008-6ba25233c867@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?  (Adam Brusselback <adambrusselback@gmail.com>)
Ответы Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?
Список pgsql-general

On 17/4/20 4:09 μ.μ., Adam Brusselback wrote:

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.

Yes I thought of that, but those are coming automatically from our mail server (via synonym), we have written an alias : a program that parses and stores emails. This is generic, I wouldn't like to add specific code (or specific columns)  just for image attachments. However I dig the idea of the indexes.
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.
As I describe above, those attachments are nowhere as files. They are email attachments. Also we got about half TB of them.

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Could not resolve host name error in psycopg2
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Replication issue