[fpc-pascal]How to process pictures?

Rainer Hantsch rainer at hantsch.co.at
Wed Jan 8 07:54:18 CET 2003


Because I received not one answer to my earlier question, I want to repeat it.
Please, be so kind and give me some help. I am an absolute novice with working
with images, so any help is welcome. -- THANKS!

What I want to do is writing FreePascal Programs for LINUX which can work with
pictures (reading/writing JPG files to/from memory in a usable form). With
'usable', I mean that the picture should be easily accessible, so an
array [x,y,color] would be a good choice, I think. (Color = 0..2 for R/G/B)

How can I read a jpg file into such an array and decode/uncompress it hereby?

If there are some ready made libraries available which produce a different
(but known) output format, this will probably be a good start and possibly
save a lot of work. - Which libraries do you recommend? HOW can they be used
from FPC?


Another step (coming much later) will be to make the textmode program
displaying the image on my X-Desktop (KDE). Is this very complicated? Does
somebody have an example program for me which shows a simple way of opening a
graphical window and show a picture inside, or, maybe, white a complete GUI
application with an OOP (Non Delphi) model?

Again: I never did that before. I also do not know which libraries are the
best for easy coding. Some say OpenGL, others say Qt, ... I don't know any of
them and I also don't know their advantages and disadvantages.
Because I do not want to do many exotic things (only standard programs
looking like YAST2, i.e.), I will prefer the easier to code solution.
Maybe, somebody has written a wrapper unit, offering handy procedures which
are translated to the more or less complicated library calls in the

Please, leave me some information.

Thanks in advance


  Ing. Rainer Hantsch

|      \\|//              Ing. Rainer HANTSCH  -  Hardware + Software |
|      (o o)              Forget Windoze! -- We focus on L-I-N-U-X... |
| Ing. Rainer HANTSCH |  mail: office at hantsch.co.at                   |
| Khunngasse 21/20    |   www: http://www.hantsch.co.at               |
| A-1030 Vienna       |   tel: +43-1-79885380    fax: +43-1-798853818 |
| ** A u s t r i a ** | handy: +43-664-9194382   UID-Nr: ATU 11134002 |

More information about the fpc-pascal mailing list