-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different crop results #352
Comments
I'm not seeing this problem. It might be something specific with the images that you're using. Would you mind providing them? |
Thanks, I definitely see the problem now. Not sure what's causing it though. I'll dig into it when I have more time. In the meantime, you maybe able to destroy the croppie instance and reinitialize it. |
destroy instance and re-initialize it Foliotek/Croppie#352
Even I am facing the same issue with the latest version of Croppie, older version was working just fine. |
Same issue and seems related to the images it self. If i save the exact same image with a bit less quality the issue arises. |
Issue also occurs when getting base64 result of viewport. Enabling enableOrientation options seems to have helped in my situation. |
Same issue here. |
I have this issue too, even more so when i reload a second time the same image. Any ideas? |
I find that the more times I use the croppie, the more likely it is to give wrong results. So, it is really helpful to destroy the croppie and reinitialize it after getting the cropping result every time. |
Can you provide an example of this please? i'm suffering a lot with this. I'm using the vue.js version but same problems. I am setting it up as a tag in my code so not sure after that how to destroy it and recreate it. Your help is much appreciated. |
Dear enzeberg, thank you, sadly i can't emplement this, i'm using the vue version of croppie and these dont work. I'm stuck for now, not sure what to do. |
@nicolasvahidzein First choosing fileChoose fileClick "设为头像” button to get the result
Second choosing fileChoose fileClick "设为头像” button to get the result |
Yes my friend, i did. The css is and loading is fine. The problem is that i am using the vue-croppie version and it's a container for croppie but i'm not lucky, also i am passing the data from my webcam and then sometimes i get a bad result. |
I'm sorry, friend. I have no idea about vue-croppie. In fact, I know very little about web development. (#...#) |
Not a problem, thank you very much for all your help. |
I'm not good in English. but this would be help vue.js users.
install: import:
|
You are mighty kind Arma, that was amazing!!!!!!!!!!!! Thank you so much. How do i give you a star or a million thumbs up? This worked perfectly. Thanks. |
Wouldn't it be wiser to improve the Vue component rather than saying to not use the Vue component? /cc @jofftiquez |
@brunogaspar thanks for informing me. |
Hey Joff and Bruno, Yes indeed it would be better but Joff here is very busy and we don't have the luxury to wait while we are designing an app as you must already know. I submitted many issues we are still waiting to hear back from. If Joff has the time i'm still here to work with him on those but until then @arma2521 provide the perfect solution and the module now works like a charm. The ball is in my friend's Joff court. On that note, Joff, any progress on what we discussed on gitter? |
@nicolasvahidzein Yup, i totally understand :) I'm using a similar solution, but i'm still using the Vue component. Basically, when the file get's selected i destroy and i re-initialize the croppie instance again (the same way it's being done without the Vue component) onFileChange(event, instance) {
var files = event.target.files || event.dataTransfer.files
if (! files.length) {
return
}
var croppieInstance = this.$refs[instance]
croppieInstance.destroy()
croppieInstance.initCroppie()
croppieInstance.bind({
url: window.URL.createObjectURL(files[0])
})
}, The file input i'm using <input id="file" type="file" @change="onFileChange($event, 'this-is-the-croppie-ref-name')" accept="image/*" /> So far, it's working as expected |
@nicolasvahidzein and @brunogaspar may we discuss in this in our gitter so we don't disturb this thread hehe. Thanks! I'm looking into it now. |
I'm getting this issue too, using version 2.5.0 having to destroy and re-init, instead of just passing a new image to "bind" |
Yes, I would guess it is the same issue on both threads. And it turns out I am getting the issue too, version 2.5.0. |
Left is Croppie's output, Right is the original image. Taken from the demo site. Note how the resulting image is warmer than the original? Also, when exporting a png with a circle crop, the alpha channel part of the image is a light, transparent grey, and not purely transparent pixels. See Below. Lastly, on the circular crop, the aliasing of the circle can cause white pixels to show up on the edges of the circle. This behavior was seen on: Chrome Mac Version 61.0.3163.100 (Official Build) (64-bit) |
I got like this problem in SweetAlert2 modal, If I put This is the problem of element or CSS cause this issues? I tried Sorry for my English by the way. |
@MatthewAry Your issue is different from this issue. I'd recommend adding it to a new issue. @nakorndev Same goes for you. |
@thedustinsmith Okay, I've made it a separate issue. |
First picture it works great.
But upload again, the result seems like been zoom in to upper left corner.
Any ideas?
The text was updated successfully, but these errors were encountered: