Cropper script not cropping properly

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

Cropper script not cropping properly

Postby Schop » Wed Feb 01, 2012 2:34 am

I have the idea something has changed to the image cropper script.

I have the following settings in 'File Uploads': Thumbnail Width: 300px, Thumbnail Height: 300px;

When I select 'bounded size' when making a thumbnail (in either Manage Media or while uploading a popup image in an entry or page), one would expect that either the width or the height of the thumbnail will become 300 pixels (whichever is the biggest).

However, the result is like this:

Image

The resulting image is 300 * 240 pixels (yay!), however, it has cut out a part of the picture that I did not select, and fills up the bottom with a nasty black area.

Something similar happens when I select 'Fixed Proportions' or 'Free Crop'.

Another issue, not totally unrelated: it is impossible to enter a value greater than 999 in the fields for thumbnail width or height in the configuration of File Uploads. This is going to cause problems.
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Cropper script not cropping properly

Postby Harm10 » Wed Feb 01, 2012 9:16 am

Could you please specify what version you are using? And if possible also the version of timthumb.php (it's located in /includes) and viewable in the header.

I guess the limit of 999 could be easily lifted although I am not sure what the consequences will be for the cropping process itself.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Cropper script not cropping properly

Postby Schop » Wed Feb 01, 2012 1:28 pm

I downloaded everything from http://pivotx.net/files/unstable-development yesterday.
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Cropper script not cropping properly

Postby Schop » Wed Feb 01, 2012 1:35 pm

Harm10 wrote:
I guess the limit of 999 could be easily lifted although I am not sure what the consequences will be for the cropping process itself.


It is basically a dummy value. I use it in the 'height' setting, and then put a real value (like 300) in the width setting, so that the cropper script doesn't accidentally make thumbs wider than 300 pixels. I do not care about the height, but the width of a thumbnail can ruin the layout.

Of course I have to compain again about the fancybox script, with the horrible fancybox_thumbnail parameter. I had thickbox active, everything shows the way you expect it. Then when you activate fancybox, the way the thumbs are displayed changes all of a sudden...not good (but this is totally unrelated).
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Cropper script not cropping properly

Postby Harm10 » Wed Feb 01, 2012 2:55 pm

I guess this discussion needs an example (or link) of how you display your images. First the upload variables are not used for creating thumbnails when uploading (these have been forgotten to implement long ago and probably will disappear altogether in the future) and most extensions create their own right now. For working with thumbnails extension Imagetools is a great tool. The last version also contains a sample on how to use it together with Fancybox. This self creation is a better solution then creating them when uploading because recreation is not possible after uploading.
Which brings me to your last remark: I have no problems with Fancybox. It is all in the settings. But as you have downloaded the latest version from unstable you probably also have noticed the new Timthumb config file? In there you can define for example the desired zoomcrop value which has a lot influence on how images are displayed next to each other when their dimensions are different.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Cropper script not cropping properly

Postby Schop » Wed Feb 01, 2012 4:45 pm

Harm10 wrote:First the upload variables are not used for creating thumbnails when uploading


I think this is wrong. They _are_ used. If you choose something else then 'free crop', the cropper script takes these values in consideration (as it should).

This self creation is a better solution then creating them when uploading because recreation is not possible after uploading.


It _is_ possible. After uploading and creating a thumbnail, you can go to Media Management and re-create the thumbnail with the cropper script. It works fine.
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Cropper script not cropping properly

Postby Harm10 » Wed Feb 01, 2012 5:43 pm

Schop wrote:I think this is wrong. They _are_ used. If you choose something else then 'free crop', the cropper script takes these values in consideration (as it should).
I think we are talking about different methods of uploading. I am talking about the upload of images when you use insert image in the editor (free crop is no option there). According to Hans the thumbnail doesn't get created then. I know you can update (or change) them through Media but that is something entirely different. And if you have lots of images that is a lot of work.....
What method of uploading are you talking about?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Cropper script not cropping properly

Postby Schop » Wed Feb 01, 2012 8:40 pm

This is getting more confusing by the minute.

Of course there is no option to create a thumbnail when you upload an image. It wouldn't be useful.

However, if you select 'Insert a PivotX popup', you are able to select 'edit thumbnail' in the upload window, which starts the otherwise excellent cropper, with the three different options. This is a perfect way to insert a popup image. If the cropper would work right, that is.

I have always thought that this is the right way to insert a popup image triggered by a thumbnail, and this way you are assured there is an actual thumbnail with the right size.
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Cropper script not cropping properly

Postby Harm10 » Wed Feb 01, 2012 10:44 pm

I have never used the option you are pointing to. So I am not aware of any history for this. Maybe Hans knows.
I always use either the popup template code like specified in Fancybox and adapt it there to my wishes or the thumbnail template tag of extension Imagetools.
Other extensions like Gallery or Bonusfields have their own code that also makes use of timthumb.
Another option is the extra image field and coding the timthumb creation string in my theme templates.

So could Hans get involved for this?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Cropper script not cropping properly

Postby Schop » Wed Feb 01, 2012 11:17 pm

Of course for advanced users the options you are talking about are fine, but: I create websites using PivotX for 'normal' users, who do not need (or want) to know anything about template codes. They just need to be able to publish a page or an entry and insert a popup image with a thumbnail in a user friendly way. Right now, the only - and very good - option for them is the 'Insert a pop-up image' button with the cropper tool. The cropper tool, by the way, has nothing to do with timthumb at all. Timthumb is used to make thumbs 'on the fly, if I am not mistaken. the cropper tool actually creates a thumbnail.

TO get back to the original post title though: the cropper tool is not doing what it is supposed to do.
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Next

Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 2 guests

cron