Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Images without QT?

2 views
Skip to first unread message

Andrea Raimondi

unread,
Aug 1, 2005, 2:21:07 PM8/1/05
to
Hello,

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

Jonathan Benedicto

unread,
Aug 1, 2005, 2:35:53 PM8/1/05
to
"Andrea Raimondi" <rain...@tin.it> wrote in message
news:42ee...@newsgroups.borland.com...

Can't you use gd as a shared library ? I mean, write your own wrapper.

Jonathan


theo

unread,
Aug 1, 2005, 4:31:18 PM8/1/05
to
Andrea Raimondi schrieb:

>
> 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.
>


What exactly do you want to do?

Andrea Raimondi

unread,
Aug 2, 2005, 4:36:13 AM8/2/05
to
theo wrote:
> 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

theo

unread,
Aug 2, 2005, 5:06:54 AM8/2/05
to
Andrea Raimondi schrieb:


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).

theo

unread,
Aug 3, 2005, 1:11:09 PM8/3/05
to
Andrea Raimondi schrieb:

>
>
> I want to find the dominant color in a JPG or BMP file, producing a console
> application.
>


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.

0 new messages