Laborator

Laborator supports this item

Supported

This author's response time can be up to 2 business days.

55 comments found.

Hi, i’m having troubles, there are two errors :

Warning: main(../class/ImageTools.class.php) [function.main]: failed to open stream: No such file or directory in /homez.167/blobides/touchetlaurent/clients/ddv/dev/admin/edit_home_product.php on line 6

Warning: main() [function.include]: Failed opening ’../class/ImageTools.class.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /homez.167/blobides/touchetlaurent/clients/ddv/dev/admin/edit_home_product.php on line 6

The files are in the class folder ! My other files are loaded successfully but not the ImageTools.class.php

any issue ? oO

Thanks :)

I’m sorry, the error is :

Parse error: syntax error, unexpected T_STRING, expecting ‘{’ in /home/web/ponthierr_e3g5y/ponthierry-cave.fr/www/dev/class/ImageTools.class.php on line 34

Work fine, PHP5 error :)

Is it possible to resize the same picture for differents sizes ?

$img = new ImageTools(”../img/p/”.$product_picture); $img->resizeNewByWidth(150,150,150,”#fff”); $img->save(”../img/p/thumbs/”, ”$product_picture”, 85, true);

$img_medium = new ImageTools(”../img/p/”.$product_picture); $img_medium -> resizeNewByWidth(456,400,456,”#fff”); $img_medium -> save(”../img/p/”, ”$product_picture”, 85, true);

Is it the good way ?

Thanks :)

Hi aroh

I am sorry for the late response

Do you get “notice” warnings as errors or which type of error?

If there are notice warnings you may stop them showing by adding on the top of php file this line

error_reporting(E_ERROR);

and it will not appear anymore.

Thanks for purchase

Hello,

How do I fix this error?

Warning: imagedestroy(): 2721 is not a valid Image resource in /var/www/ ... /upload/src/ImageTools.class.php on line 336 o_3988 – o_3988Used_2008_GMC_Acadia_SLT1_439179_3160

Thanks, Matt

I’ve noticed that line is not appropriate so you can just go to line 336 (on ImageTools.class.php file) and just remove the line or add an ’@’ symbol before the function

@imagedestroy($this->im);

This should be work, and thanks for purchase

Worked, thanks

Hi, I need to have a base graphic png, place a png logo on it, place up to 8 fields of text from a mysql db from worpress, place another png, place another png. I can do this with indesign, but I want to permit a user to build their own graphic. This is generally done with flash. Would I use this imagetools? Would it be better to build in wordpress or opencart or other manner? Thank you. J

Hey Arl1nd,

This script is great, but i need it to work with amazon’s S3 urls.

Do you mean with external URL ’s? If so, you should enable PHP to open URL files.

Hello – One question: can this be implemented in WordPress? After uploading an image via “featured image” or “insent image”?

It could be implemented but needs some customizations and use it as plugin. If you are experienced developer you may do this.

Hi,

i have 2 questions.

Are the Script secure. I need to open with your Script images in PHP file while i have desabled the direkt access to Apache in the image Folder.

And can i resize image on example 200X120 with different Formats? i have images thats going on high 400800 or 600200 and i make preload images with your Script?

Thanks a lot… :-)

hi

I get this error with an jpg image 4096?×?3112 size

Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 4096 bytes) in /home/*/public_html/siniflar/ImageTools.class.php on line 76

I already update memory_limit to 256M in VHM panel.

Hi paranoidcamel,

On ImageTools.class.php on line 58 there is a ini_set declaration that overwrites your “memory_limit” contraint. So either remove it or change to your desired limit its the same. I suggest you to remove that line and use your own ini_set functions.

Arlind

oh my friend, I am trying to fixes this all day, I try everything, change memory limit from php.ini change memory limit from htacces change memory limit from php code

and my image was 4096×3112×4 = 50.9 mb that is a little bit more than your const ALLOCATE _MEMORY = ‘50M’;

I didnt think that you may set this before.

anyway thanks…. :D

Is this the proper way of using it?

$newNamePrefix = date("Y-m-d") . '_';
$img = new ImageTools($_FILES'file');
$img->resizeWidth(600); // new width
$imagenUp = 'images/' . $newNamePrefix . $_FILES'file';
$img->save($imagenUp);

Or do I have to use anything else to specify the new resized image instead of using $_FILES‘file’ again?

Hi rodvaN,

In order to resize an image I recommend you to save it to its own original format, if you use from $_FILES it will give you the tmp name with no extension so this could be the best way for you:

$tmp_name = $_FILES["file"]["tmp_name"];
$name = $_FILES["file"]["name"];
$uploads_dir = "images";
move_uploaded_file($tmp_name, "$uploads_dir/$name");

$newNamePrefix = date("Y-m-d") . '_';
$img = new ImageTools("$uploads_dir/$name");
$img->resizeWidth(600); // new width
$imagenUp = 'images/' . $newNamePrefix . $name;
$img->save($imagenUp);

Sorry for the delay of the answer.

I cannot get this to work if there is anything else on the page – for example:

include ("includes/ImageTools.class.php");

$img = new ImageTools("image.jpg");
$img->resizeHeight(200);
$img->showImage();
$img->destroy(); 

works but

print "hello";
include ("includes/ImageTools.class.php");

$img = new ImageTools("image.jpg");
$img->resizeHeight(200);
$img->showImage();
$img->destroy(); 

does not. There are no errors shown on screen and error_log is also got nothing :/

Hi

The code provided above is used to show php file as image type when php is executed it will show the image so if you “echo” something it will break that format.

This is intended to use just as external image handler. If you need to use “echo” you should not do it in this file because of output type.


Arlind

Hi there,

I have purchased premium media script(images and media based website), watermark text or image is not provided for uploading pictures, does your script works on my script?

Tanx in advance

Hi Raajastra, our plugin is very old now, and we don’t think that it will work with your script.

Kind Regards,
—Ylli

Hi – I see you’ve added Alpha Transparency Preserve (fixed / enhanced)

Is that for the original target image transparency? We need to add watermarks to cutout images in different shapes – all with full transparent backgrounds. We need that transparency to remain so that the watermarked image can be added to an HTML5 canvas for manipulation over other images.

I’ve tried another watermarking script and it replaces the target images transparent background with a solid black color. Can your script do this properly?

Thanks.

Hi

This script dates from early time I have started developing in PHP, so it only has those features you saw in demo site.

So I am not sure if this will work good for you! I would say you to choose another script rather than buying this and not working as you expected, I am sorry about that.


Arlind

hi … the preview link is not working … could u plz provide one ..

Hi creosky

You can check it now, it is online again. Thanks for reporting it.


Arlind

have a sharpen?

Hi pixeleak,

No it doesn’t have.

Kind regards,
—Ylli

by
by
by
by
by
by