Hello,

I have a project where this module is used extensively, so i had to dig into the code and almost another module came out... That's why i called issue 7.x-2.0. I had no time to submit each path just after it's creation so here is the pack.

Changes:
Now module is not just a widget for the image, but separate field. Its done to support revisions mostly. Because there was no way to store cropped versions and crop area dimensions between revisions. Cropping area dimensions were stored in the variables and it could cause memory problems if we had more then 100 000 nodes. But lots of other issues/improvements were also covered.
Issue http://drupal.org/node/1219208 also fixed in this version
Image path flush added after image re-crop.
Also previous patches are included http://drupal.org/node/1106924#comment-4524598, http://drupal.org/node/1139762

I understand that its difficult to accept so many changes at one, but i needed all these changes urgently for my project and now i can share it with you. Of course i can help maintaining this module in the future.
I'm not sure whether patches can be applied to current dev version, as long as patches are created against earlier version. So i post module altogether and all patches, to track how changes where made.

Comments

yhager’s picture

Wow, thanks for all the work you did, and thanks for sharing it.

I've tried throughout the life of this module, since 5.x days to refrain from it being a real field - this simplifies it a lot (and complicates it at the same time). However, I am willing to reconsider this.

As I can't get my head around this enormous amount of patches, I have created a branch 7.x-2.x on the module, and gave you commit rights. Please commit all your stuff there, and leave a note here.

We can take it from there, and also get more feedback from other users this way.

I do need help in maintenance, so we can discuss that too.

Thanks!

zhgenti’s picture

Hi!
Just committed code into 7.x-2.x. It should be fully functional, but still needs some code polishing and adding comments. Please have a try and let me know.
Also few features planed to be added:
1) As long as core function image_resize can't handle .gif files, I'm thinking about adding functionality for transformation gifs into jpegs and then resizing them.
2) Option to select maximum available area of the image. for example if you have 200x150 output resolution and image is 800x600, user can choose whether widget will create area 200x150 or select maximum possible area according to proportions and then scale it to 200x150.

Eric Yang’s picture

That's great, that fixes some of the problems I have.
By the way, I can't find the 7.x-2.x branch.

yhager’s picture

@Eric Yang: I have created the release, but the drupal packaging script is running once every 12 hours, so better check tomorrow again. However, you can still grab a copy directly from git.
http://drupalcode.org/project/imagefield_crop.git/shortlog/refs/heads/7....

rogical’s picture

+1
Hope to see the normal release soon.

zhgenti’s picture

Hi there.
Just committed two features mentioned above.

  1. Gif files processing. Now there is an option on the widget settings form, where you can select how to process gif files. You can convert them into jpeg and resize or you can leave them without processing(gif file will be saved as is, without cropping and resizing).
  2. Second option added in this commit is for selecting maximum cropping area on widget load. For example you have output resolution 200x150 and image 600x160, with this option enabled widget will select maximum cropping area according to proportions, should be something like 208x160

Have a try and let me know if any bugs encountered.
thanks

anonym-developer’s picture

Title: 7.x-2.0 version » +1
anonym-developer’s picture

cannot see through all the patches and versions of the module. anyway, nice work!

yhager’s picture

Title: +1 » 7.x-2.0 version
Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Fixed

@anonym-developer, all these patches are now committed to branch 7,x-2.x. It is maintained by zhgenti.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

spelling error