[fpc-pascal]How to use Linux libraries?

James Mills prologic at daisy.ods.org
Fri Jul 25 16:25:38 CEST 2003


On Fri, Jul 25, 2003 at 04:04:47PM +0200, Rainer Hantsch wrote:
> On Fri, 25 Jul 2003, Michael Van Canneyt wrote:
> | It uses some windows bitmap structures, and cannot be compiled on Linux as
> | is. For the rest it compiles 100% fine. You could cut&paste the needed
> | definitions from the windows unit and put them between {$ifndef
> | win32}..{$endif}
> 
> So, in fact, the whole 'pasjpeg' does not exist at all, because converting
> such a thing will require that knowledge which I currently do not have. The
> only way to learn from source code is to analyze a _working_ one. It makes no
> sense to analyze windows-dependent code when Linux code is (so I guess)
> nearely the opposite -- otherwise it would not be so complicated to port
> Windoze-Software to Linux...
> 
> 
> So I return to my initial question in the hope that somebody has already done
> such things...
> 
> What I need for my first steps, is some source code which compiles without any
> change on Linux and uses Linux' shared libraries for reading/writing data
> from/to image files in jpeg/gif/tif/... format.
> I definitely prefer procedural and/or OOP style before Delphi Style, because
> this is easier to understand and also matches better to my already existing
> code.
> 
> A good sample for doing first steps would be a program which reads a little
> JPEG image into RAM, hereby decoding it into a simple structure (i.e. an array
> of pixels, one for every color, so that I can get the RGB or CMYK values out
> easily for every pixel.
> Next step would be to store this structure back into a file.
> 
> With this two steps I can start. Nobody here who can help?

I could write you up a set of such procedures or classes to do this,
however I'm starting back at uni. New semester :)
Anyway, I'm sure there are others here on this mailing list that could
do the same.

Question: Why can't you do it yourself ?
It isn't that hard to grab the specs of the JPEG image format and learn
it and write your own data structures to contain the jpeg image data,
decode it into pixel arrays... It's all there in the specs :)

cheers
James

> 
> 
>   Ing. Rainer Hantsch
> 
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
-
-Zero Defect Software Engineers Group - ZDSEG
-
-You need only two tools. WD-40 and duct tape.
-If it doesn't move and it should, use WD-40.
-If it moves and shouldn't, use the tape.




More information about the fpc-pascal mailing list