Hey there,
Awesome module!!! Thousand kudos for the concept and the way it's implemented!
The bug I found can be reproduced like this:
Insert an image, and make it really small.
Save the node.
Re-edit the node and make the image really big (because you've changed your mind, the image should be big...)
Save the node.
Result: the (big, second-generation) posted image is blurry.
This wouldn't be necessary if the published image would be generated using the original upload, and not the previous resized version.
Fixing this would also move into the direction of allowing a super cool crop feature in the future maybe?
Many thanks for the great work!
Michael
Comments
Comment #1
thinkround commentedMore thoughts on this issue:
http://drupal.org/node/787352#comment-3763548
Comment #2
quicksketchThis is already the case. Image Resize Filter always uses the original image for manipulations. The large image is blurry because you've increased the image beyond the original upload size.
Comment #3
thinkround commentedAnother hint:
A lightbox link keeps projecting the original image even after resizing the picture back and forth so much that it is not recognizable anymore and even after emptying the resize folder resulting with the current bug in a broken image on any image that has been resized more than once: the overlay in the lightbox keeps showing the original nice and clear!
Cheers, Michael
Ps. If I would understand PHP I'd attach a patch, but it's not a language I comprehend well enough to write.
Comment #4
thinkround commentedAt #2:
Please read my comments at http://drupal.org/node/787352#comment-3763548 as well.
What you say is not true, to prove the point I attached three pictures:
the original toys.jpg of 550x225 pixels
the resized toys-10x5.jpg
and the screwed up toys-100-50.jpg
In other words, the large image is 5 times as small as the original, but 10 times the size of the small size. It is blurry because it didn't use the original.
Comment #5
quicksketchI don't see how you were resizing the resized image. It looks from the naming of the files that you did indeed resize the image twice, but I have no idea how you managed to do this. Did you copy/paste the source code when viewing the node and then paste that into a new node? Image Resize Filter NEVER changes the text of a node when editing the node, it only changes it on viewing the node (it's just an Input Format after all).
Comment #6
thinkround commentedAt #2:
Another discovery:
When I resized the screwed up toys-100x50.jpg it did use the first-generation resized image as an original instead of the previous version: toys-10x5-500x250.jpg
but then I resized again and the file resize/resize/resize/images/toys-10x5-500x250-400x200.jpg got created...
Once more an overview of the history of this image:
550x225 original
10x5 #2 using original
100x50 #3 using #2
500x250 #4 using #2!
400x200 #5 using #4
It is beyond my comprehension what exactly is going on here, but it is interesting nevertheless and definitely not what I expected.
Comment #7
thinkround commentedAt #5:
Well, it is obviously not what was supposed to happen. I uploaded the image using CKfinder, then changed the width of the image in the CKeditor image properties dialogue, then saved without doing anything else. No copy paste involved. Just save, edit, save, edit.
I am trying to think what I did different with number 4, when creating 500x250, because there the bug didn't show up, like you would expect, but as far as I can think of nothing comes to my mind.
It's late for me now, got a big day ahead of me tomorrow.
Will be back for further testing in a few days.
Good luck with this! m
Comment #8
quicksketchAre you sure CKfinder didn't resize the image at this point? What you're describing certainly doesn't happen if you manually type out the
<img>tag then resize it directly in the WYSIWYG editor. Obviously this behavior would be quite a large problem, but so far this is the first report of this occurring that I've heard. I use this module one several of my own sites too, so I know this isn't the normal behavior. I think another module or something in your WYSIWYG is resizing the image separately of Image Resize Filter.Comment #9
florisla commentedUsing FckEditor and its file manager (without Wysiwyg module), I can't reproduce this either.
Image Resize filter always uses the original image for scaling.
Comment #10
florisla commented@thinkround, can you provide more detailed steps to reproduce?
Comment #11
thinkround commentedHi there,
After some more testing I found out that this actually caused by conflict with the CKeditor. The problem is:
CKeditor has a 'security feature' that replaces the original image with a resized picture which is called Image Resize Filter. I mistook this option to be the integration of the Image Resize Filter module into CKeditor and enabled it. The result was that images were being resized twice, on load of the editor and on presentation of the node...
After disabling this option of CKeditor everything worked without a flaw.
Thanks for your time, and thanks again for the module!
Michael
Ps. Attached a screenshot of the CKeditor 'security features', highlighted the Image Resize filter description...