Hi there
I am working on using gdlib to create thumbnails in gallery and have substitutted the code for image resize in util.php under netpbm with the following code:
Quote:
$err = 0;
$src = fs_import_filename($src);
$out = fs_import_filename($out);
$src_img = imagecreatefromJPEG($src);
if ( imagesx($src_img) > imagesy($src_img) ) {
$xsize = $target;
$ysize = imagesy($src_img) / ( imagesx($src_img) / $target );
} else {
$ysize = $target;
$xsize = imagesx($src_img) / ( imagesy($src_img) / $target );
}
$dst_img = imagecreate($xsize,$ysize);
imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $xsize, $ysize, imagesx($src_img), imagesy($src_img));
imagejpeg($dst_img, $out, $gallery->app->jpegImageQuality);
The problem is that when I upload using gallery remote it stops after uploading one file and says: gallery not found on url. The file is uploaded ok and if I press upload again it uploads the next file. I guess it has something to do with my "hack" not returning the correct error code... Can you help? :grin:
I have also tried uploading with Windows XPs image upload program and it works like a charm.