1px*700px

See all posts Reply

1px*700px new!
by Possible bug?, 16 years, 10 months ago
When I try uploading a image width x=1px, y=700px an error ocorrs.

I've this config:
$handle->image_resize   = true;
$handle->image_ratio    = true;
$handle->image_x        = 500;
$handle->image_y        = 500;

So, when it tries to resize to 500 image_y, x can't be resized. And it doesn't work.

;-)Reply
Re: 1px*700px new!
by colin, 16 years, 10 months ago
You are right, there is a bug. The width or height of the image being between 0 and 1 leads to an error. It will be fixed in the next version.

In the meantime, you can look for
$image_dst = $this->imagecreatenew($this->image_dst_x, $this->image_dst_y);

And add the following two lines just before, so it looks like this:
if ($this->image_dst_x < 1) $this->image_dst_x = 1; 
if ($this->image_dst_y < 1) $this->image_dst_y = 1;
$image_dst = $this->imagecreatenew($this->image_dst_x, $this->image_dst_y);

Thank you for reporting the issue.Reply
Re: 1px*700px new!
by tonny, 16 years, 10 months ago
;)

Thanks!!

It works fine! ;-)

The script is very very good ;-) Thanks!Reply
Re: 1px*700px new!
by colin, 16 years, 10 months ago
My pleasure.

Of course, if you like the script "very very" much, feel free to donate! ;)Reply