-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Resize or Set quality #85
Comments
You can call |
Actually I can successfully show image on unity client with LoadImageAtPath. But after that I prepare WWWForm to send this image to server.
So I send bytes of image in path, before that how can I resize or decrease its quality? |
You can use texture.EncodeToPNG or EncodeToJPG but LoadImageAtPath's 3rd parameter must be false. |
Again It gives 413 Request Entity Too Large error when I send avatarFormData to my server, If I choose small images it works fine but when I choose big images or unresized images it gives this image, I font understand why :/ |
You need to decrease Constants.MAX_SIZE. |
I already try it :/, First I set it 512 then down 256 also try 128 and others |
lol 512 itself is also a fairly small number. I wonder how small the server expects the images to be. You can use EncodeToJPG with a lower quality parameter if you wish but transparency will be lost. |
Yes now it works when I use EncodeToJPG, But why it doesnt work via EncodeToPNG. even I didnt give quality parameter to EncodeToJPG it still works fine. Weird |
I wouldn't expect a massive size difference either. But as a side note, EncodeToJPG's default quality value is 75, not 100. |
Hi,
I capture image from camera and then send it as WWWForm to my server. it works on gallery side with small images but when I use camera my server gives this error:
413 Request Entity Too Large
So I think I need to resize or decrease quality of captured picture to send it server for save.
The text was updated successfully, but these errors were encountered: