da Silva, Joe wrote:
pascal@gargal.com wrote:
Hello, I just installed gpc in a HP-UX 11.00. I programmed in Pascal a long time ago. I'd like to know if you know which unit or library I can use to create jpg files with 2D graphics like number of users vs. memory usage to make them viewable in a Web page?
As I recall, there is a Pascal translation of the Independent JPEG Group's graphics library, available at Simtel.Net (haven't tried it, so I don't know if it's any good, nor if it does what you want).
There are also some graphics libraries for Pascal listed at "http://www.thefreecountry.com/developercity/graphicslibraries.shtml" that support the JPEG format, some may include source. Again, haven't tried any, so the same comments apply.
Of course, the JPEG format is fairly sophisticated (ie. complicated), with variable compression ratio (depending on image quality), so for a small number of images (ie. small storage requirements), it might be simpler to use another format, such as GIF or PCX? Beware that GIF compression uses the LZW algorithm and is patented, although it's use is optional (BTW, AFAIK, the LZW patent should expire in mid-2003).
I'd suggest PNG (no patents, better compression). JPEG being lossy compression is better suited for photographs, scanned images etc., not so well for computer generated drawings. Today most web browsers support PNG.
There's also the GRX unit. The recent snapshot includes support for JPEG and PNG images. http://grx.gnu.de/download/grx244p2.zip
Frank