Reply to class "thinking" that png i txt

class "thinking" that png i txt new!
by baambaam, 12 years, 6 months ago
In my script:

$foo = new upload("./upload/yt.png");
$foo->file_new_name_body    = $name;
$foo->image_resize          = true;
$foo->image_ratio_y         = true;
$foo->image_x               = $width-(2*35+2);
$foo->image_crop            = '-1 -1 -1 -1';
$foo->image_background_color= '#ffffff';
$foo->image_border          = '35 35 120 35';
$foo->image_border_color    = '#000000';
$foo->image_text            = $waterhome;
$foo->image_text_color      = $waterhomecolor;
$foo->image_text_font       = 2;
$foo->image_text_y          = -5;
$foo->image_watermark       = "./upload/tymczasowe/".$name.".jpg";
$foo->image_watermark_y     = -10;
$foo->image_convert         = 'jpg';
$foo->Process($folder);

here is my png before "transforming":
http://koko.securityhost.pl/upload/yt.png
here is after "transforming":
http://koko.securityhost.pl/upload/gotowe/2012/05/4fb29c6f6526e.txt

so u can see that new image haven't watermark and many images from GIMP have this problem.

When i was adding this:
$foo->allowed = array('image/jpeg','image/jpg','image/gif','image/png','image/bmp');

nothing happen becouse script thinking that my png is txt

any solution for me?Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important