- Get GflAx150.dll and libgfl150.dll. gflax is written by Pierre Gougelet and is available directly from XnView.
- Put them both in the same directory, and run "regsvr32 c:\whatever\gflax150.dll, libgfl doesn't need to be registered.
- // 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);
- Help.chm may also be useful.
That should do it!
|