Closed tgoldenberg closed 9 years ago
Hello, I am experiencing the same problem. Screenshots are attached below. @tgoldenberg Were you ever able to resolve this?
Hi, this was a while ago, so I'm not sure how I dealt with this :/
thanks @tgoldenberg.
@rsantamaria do you have any advice?
Hi @andyweiss1982, sadly I can't reproduce the glitch... what is your original image resolution? and what browser/version are you using?
Hi @rsantamaria thanks for following up.
I have the same error in both Chrome Version 45.0.2454.99 (64-bit) and Safari Version 8.0.8 (10600.8.9).
I have tried a few different resolutions, such as:
3648 × 5472 2894 × 4090 5179 × 3453
All have the same problem. I even tried copying through the landscape model, controller and views from the rails 4 sample app.
@rsantamaria it's strange because I have cloned the test app and everything works just fine -- same pics and browsers. So the error must be on my end somewhere but can't tell where -- is there a recommended paperclip / rails version I should try?
@andyweiss1982 what's your paperclip version?
I've had a similar issue, i've sorted the preview by overriding a max-width that had been set on all images to 100%.
#crop img {
max-width: none;
}
This seems to have sorted a similar issue to this that I was seeing. I now have some issues with the actual crop, i'm sometimes getting a slightly smaller crop than selected and sometimes just black, although i'm seeing errors from the convert command, so need to look further into that. The max-width might sort your issue though.
Thank you @stewartmckee. You're right, it's totally the case mentioned in issue #23. At first I didn't give importance to this because resolving every conflict that any plugin could do is a lost war but looks like this issue is more common than I thought.
Ah, cool, didn't even see that post! You could possibly override the css for that specific image by default and allow the resetting to be disabled in an option i suppose. BTW i also left a comment on the Railscast episode around jcrop pointing them here, its at the bottom of a ton of posts so no-one will probably ever read it, but papercrop has certainly saved me time! Thanks!
Done 5234eecc456cb47ccd16c7b30b771c1256b1245a This should do the trick, the inline css could be overridden with !important in the stylesheets if needed.
@rsantamaria I am not sure but this solves only preview image issue.
But there seems to an issue with actual crop too. The image zooms and crops when large image is uploaded. Anyone still facing similar issue?
I'm experiencing the same issue. Using Paperclip 4.3.5 and Papercrop 0.3.0.
As far as I can tell, the original photo is being resized correctly (500px wide, like the original post). However, the preview image does not scaled based on the resized photo's dimensions—instead, it is using the original (much larger) photo size. Thus the preview looks like it is zoomed in.
Any advice on how to solve this would be greatly appreciated, @rsantamaria.
@davidmccoy I ran into the same issue. It's due to this line:
https://github.com/rsantamaria/papercrop/blob/master/lib/assets/javascripts/papercrop.js#L42
which uses an arbitrary default with and height of 250px of the original image for the selected area. This commit uses the original image dimension instead to default to the largest possible area (constrained by the aspect ratio).
Aaaaaand turns out there are multiple pull requests already doing the same and more:
@rsantamaria, first of all thanks for this very helpful gem. Are you planning on maintaining it, given the number of open pull requests? I'd be happy to volunteer my help if needed.
@trusche you are correct! I found those solutions in the pull requests and should have updated here. 😄
@davidmccoy @trusche Thank you! Yes, I have plans to continue with it but I've been very busy last year and the gem is not maintained at all, sorry. In a month or so I'll have some free days to put some order here.
@rsantamaria thanks for the update! And for originating this gem.
I have the crop set up as recommended in the README, but the preview is showing a much zoomed in image, which is also being saved. How can I get the two images to match in size / zoom? This would be very helpful, thanks!