Graphics Manipulation on Windows     

  1. Get GflAx150.dll and libgfl150.dll. gflax is written by Pierre Gougelet and is available directly from XnView.
  2. Put them both in the same directory, and run "regsvr32 c:\whatever\gflax150.dll, libgfl doesn't need to be registered.
  3. // this is in server side javascript, but you can probably port it to php, etc rather easily.
    var oImage = Server.CreateObject("GflAx150.GflAx");
    oImage.LoadBitmap("c:\dir\file.jpg");
    if (oImage.Width <= 0) {
    print('Unable to load file');
    } else {
    print('width = '+oImage.Width);
    print('height = '+oImage.Height);

    var newWidth = 125;
    var newHeight = parseInt((newWidth / oImage.Width) * oImage.Height); // div height to make thumbnail
    oImage.SaveFormat = 3; // 3 = jpeg
    oImage.SaveJPEGQuality = 70;
    oImage.Resize(newWidth, newHeight);
    oImage.SaveBitmap(path+thumb_name);
  4. Help.chm may also be useful.
That should do it!

  Site by Kallahar - kallahar@kallahar.com - Hosted by DreamHost