-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
Support for large images #95
Comments
Hi @guoyingtao do you have any update about this issue? |
would appreciate an update on this, i'm encountering the same issue! |
@proloquor |
@guoyingtao i emailed you a link, thank you! :) |
@proloquor Please check #414 to see if it works for the similar images. |
Is there a way to resolve this? It’s fine if color accuracy is reduced, just need the uploader to be stable enough to handle a variety of images.
From: Yingtao Guo ***@***.***>
Date: Wednesday, October 9, 2024 at 3:08 PM
To: guoyingtao/Mantis ***@***.***>
Cc: proloquor ***@***.***>, Mention ***@***.***>
Subject: Re: [guoyingtao/Mantis] Support for large images (#95)
@proloquor<https://github.com/proloquor>
Thanks for the test image you emailed. After debugging the code, the reason the cropping failed is not because of large image but the special image format. The cgImage of the photo shows its bitsPerPixel is 32 and bitsPerComponent is 10, it likely represents an image in a high dynamic range (HDR) format.
I haven't created CGContext for 10-bit image so currently I am using 16-bit image to preserve the image accuracy.
Please check #414<#414> to see if it works for the similar images.
—
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APYRVNVNZ3KBH5O3PT2C46DZ2WEMTAVCNFSM6AAAAABPQNPIJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBTGMZTQNRQGU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@proloquor |
Sorry, I’m not an expert on image processing…Does 16 bits allow the cropper to process the sample image I shared? If not, perhaps the config setting is a good idea.
From: Yingtao Guo ***@***.***>
Date: Wednesday, October 9, 2024 at 3:54 PM
To: guoyingtao/Mantis ***@***.***>
Cc: proloquor ***@***.***>, Mention ***@***.***>
Subject: Re: [guoyingtao/Mantis] Support for large images (#95)
@proloquor<https://github.com/proloquor>
PR #414<#414> fixes the issue but it uses 16 bits image. If it is fine to reduce color accuracy, I can use 8 bits image as well or give user some config settings to choose preserving color accuracy or not.
—
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APYRVNX5ACF2EDR3IPEEIGLZ2WJX3AVCNFSM6AAAAABPQNPIJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBTGQYTAMJSGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi @proloquor, do you mind sending me the photo you're having problem with? I would like to check if the crashes I'm experiencing is same as yours. Thank you in advance |
@proloquor The sample image can be correctly cropped if I use 16-bit CGCotext. You can try PR #414 |
Memory usage isn’t an issue, thanks! I’ll give this PR a try.
From: Yingtao Guo ***@***.***>
Date: Wednesday, October 9, 2024 at 4:03 PM
To: guoyingtao/Mantis ***@***.***>
Cc: proloquor ***@***.***>, Mention ***@***.***>
Subject: Re: [guoyingtao/Mantis] Support for large images (#95)
@proloquor<https://github.com/proloquor> The sample image can be correctly cropped if I use 16-bit CGCotext. You can try PR #414<#414>
The only issue is it will increase the memory usage. If it is a big issue then I can add using 8-bit CGContext too.
—
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APYRVNVRKLX7DREOUFHKD73Z2WK33AVCNFSM6AAAAABPQNPIJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBTGQZDINRZGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@proloquor |
I think this fixes it! Go ahead and make a new release :) thank you.
From: Yingtao Guo ***@***.***>
Date: Friday, October 11, 2024 at 2:35 PM
To: guoyingtao/Mantis ***@***.***>
Cc: proloquor ***@***.***>, Mention ***@***.***>
Subject: Re: [guoyingtao/Mantis] Support for large images (#95)
@proloquor<https://github.com/proloquor>
Let me know if PR #414<#414> works for you or not, then I can make a new release. Thank you!
—
Reply to this email directly, view it on GitHub<#95 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APYRVNRRUOJZLGRTVLUD5I3Z3ASB7AVCNFSM6AAAAABPQNPIJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGAYTOMBUGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@proloquor |
Mantis requires the input image to be wrapped in an UIImage object but UIImage/UIImageView has issues with large images (see https://stackoverflow.com/questions/30941775/large-uiimage-not-showing-in-uiimageview), causing the image in Mantis to be black and the save button in Mantis not working (triggers an error message in the console: "CGBitmapContextInfoCreate: unable to allocate 1291540608 bytes for bitmap data").
Are there plans to support large images in the future?
The text was updated successfully, but these errors were encountered: