Also thumbnails are watermarked
Posted: Fri Nov 16, 2012 8:16 pm
Hello,
I have a resize and watermark function what will resize and watermark the main images while uploading and not the thumbnails, well I thought that this would be the case but it isn't. The upload image function looks like this;
Can somebody tell how this can be possible?
Thanks
I have a resize and watermark function what will resize and watermark the main images while uploading and not the thumbnails, well I thought that this would be the case but it isn't. The upload image function looks like this;
function upload_image($image_temp, $image_ext, $album_id) { $album_id = (int)$album_id; $image_name = $_FILES['image'] ['name']; mysql_query("INSERT INTO `images` VALUES ('', '$image_name', '".$_SESSION['user_id']."', '$album_id', UNIX_TIMESTAMP(), '$image_ext')"); $image_id = mysql_insert_id(); $image_file = $image_id.'.'.$image_ext; $source_image = $image_temp; $destination = 'uploads/'.$album_id.'/'.$image_file; $tn_w = 900; $tn_h = 600; $quality = 100; $wmsource = 'watermark.png'; image_handler($source_image,$destination,$tn_w,$tn_h,$quality,$wmsource); create_thumb('uploads/'.$album_id.'/', $image_file, 'uploads/thumbs/'.$album_id.'/'); }The destination is in the folder uploads and not in the folder uploads/thumbs, but still also the thumbnails are watermarked and that is not looking nice at all.
Can somebody tell how this can be possible?
Thanks