Is there a way to use image formats without using QT functions?
I googled and found "gd" but it doesn't seem to have a pascal
wrapper, at least not in the officially supported languages.
Any hints?
TIA,
Andrew
Can't you use gd as a shared library ? I mean, write your own wrapper.
Jonathan
What exactly do you want to do?
I want to find the dominant color in a JPG or BMP file, producing a console
application.
Andrew
You could take this as an inspiration:
http://www.awitness.org/delphi_pascal_tutorial/source2/bitmap_file_format.html
Instead of reading the data into a TBitmap, read it into a matrix
(dynamic Array).
As a simple solution, you could convert the JPEG to a BMP first by using
ImageMagick's commandline-tool "convert". (Not sure if this works
without X though).
This Image Library might be something for you:
http://www.colosseumbuilders.com/sourcecode.htm
It works without X. Use the "TBitmapImage" class to access the "Pixels"
property.