easy way to acquire height / width from images (PNG, JPEG) stored asbytea?

Поиск
Список
Период
Сортировка
От Achilleas Mantzios
Тема easy way to acquire height / width from images (PNG, JPEG) stored asbytea?
Дата
Msg-id 03a79221-6e00-4d8e-c6bc-c01cadb352d9@matrix.gatewaynet.com
обсуждение исходный текст
Ответы Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?
Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?
Список pgsql-general
Hello Dear List,

we have a table holding email attachments as bytea, and we would like to 
filter out images of small dimensions, which are not of any value to our 
logic.

I took a look at pg_image extension, tested it, and it proved 
problematic, it killed my 200+ days uptime FreeBSD box :( . I dropped 
the extension and uninstalled this as soon as fsck finally finished.

So I would like to ask you, basically we have PNGs and JPEGs, is there 
an easy way of parsing their headers and getting info about their 
dimensions?

I could write a C function for that. For PNG it is quite easy but for 
JPEG it gets a little bit complicated, albeit doable, just asking for 
something out of the box. Currently we load images (in our java 
enterprise system) and filter them in Java, but this brings wildfly down 
to its knees pretty easy and quickly.


Thank you and happy Easter.




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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Is there a script and sample data to test the performance of postgresql?
Следующее
От: Adam Brusselback
Дата:
Сообщение: Re: easy way to acquire height / width from images (PNG, JPEG) storedas bytea?