Menu

how to use imagelib ?

2002-11-23
2012-09-26
  • Nobody/Anonymous

    where are simple examples to use the jpeg/tiff/png loading portions of the imagelib dev-pak libraries?

    I know how to include the libjpeg.a, etc in the project options but I need usage on how to use it, like trying to load in a jpeg would be a good first start.

    thnx

     
    • Nobody/Anonymous

      OK.. with the imagelib devpak installed,  I've got (for jpeglib):

      in Project Options/object libs I have:
      - ljpeg  (for libjpeg.a).

      and

      #include "..\\jpeg\\jpeglib.h"
      #include "..\\jpeg\\jerror.h"

      and

      int foo() {
              jpeg_decompress_struct cinfo;
              jpeg_error_mgr jerr;

              cinfo.err = jpeg_std_error(&jerr);
              jpeg_create_decompress(&cinfo);
      }

      linker errors:

      [Linker error] undefined reference to `jpeg_std_error(jpeg_error_mgr *)'
      [Linker error] undefined reference to `jpeg_CreateDecompress(jpeg_decompress_struct *, int, unsigned int)'

       
    • Nobody/Anonymous

      btw I did add the following to the project options:

      -ljpeg -lz  (for libjpeg.a and libz.a)

      what could be causing those linker errors above?

      - drarem

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.