Giter Club home page Giter Club logo

Comments (12)

TimOliver avatar TimOliver commented on August 21, 2024

Hi Arjun! Glad you're enjoying the app!

Oh dear! I remember seeing that once or twice during development in the simulator, but never on the device. I did a bit of research just now and it looked like it's an issue that arrises if a memory warning occurs.

How big is the image you were trying to crop?

from tocropviewcontroller.

ArjunSa786 avatar ArjunSa786 commented on August 21, 2024

hi tim thanks for reply
images size is 1.9 MB

from tocropviewcontroller.

TimOliver avatar TimOliver commented on August 21, 2024

Hrmm, and what was its pixel resolution? When you're manipulating it in the crop controller, it gets decompressed into raw pixel data, which can take up a lot more memory than what's on disk.

I might have to look into making the controller a bit more memory efficient. Or if worse comes to worse, you can always downscale your images before sending them to the crop controller.

from tocropviewcontroller.

ArjunSa786 avatar ArjunSa786 commented on August 21, 2024

750X1334 resolution.i was pick image in image picker controller and pass to image in cropview.when i click done button it will happen .

from tocropviewcontroller.

TimOliver avatar TimOliver commented on August 21, 2024

Aw. That's absolutely tiny. That shouldn't be causing any memory issues. :S

I'm not sure then. Is it happening reliably each time you use the cropper?
And, just in case, are you doing any rotations to the image?

-Tim

On 5 August 2015 at 13:20, ArjunSa786 [email protected] wrote:

750X1334 resolution.i was pick image in image picher controller and pass
to image in cropview.


Reply to this email directly or view it on GitHub
#11 (comment)
.

from tocropviewcontroller.

ArjunSa786 avatar ArjunSa786 commented on August 21, 2024

No, i am not doing any rotation,it will come 4 times each of 10 using crop. and when i click done button also show in log -----<<<>>>> <UIVisualEffectView 0x15f66cf10> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1.

from tocropviewcontroller.

TimOliver avatar TimOliver commented on August 21, 2024

Hrmm... there's literally none of my code in that call stack. I wonder what's going on. :S

from tocropviewcontroller.

ArjunSa786 avatar ArjunSa786 commented on August 21, 2024

iMAGE RESOLUTION (3264.0, 2448.0) orientation 0 scale 2.000000 and returncropped image resolution is {6528, 4892}
when convert into byte 1203580 bytes using
let imageData = UIImageJPEGRepresentation(image, 0.0)
any idea reduse size but not dimension ?

from tocropviewcontroller.

ArjunSa786 avatar ArjunSa786 commented on August 21, 2024

[self.image croppedImageWithFrame:cropFrame angle:angle] when call this method dimention is double. how to change?

from tocropviewcontroller.

iori57 avatar iori57 commented on August 21, 2024

My app is crashing as well when trying to crop a very large image. The image is 3.3MB in size and with resolution 3264x2448 which is a photo taken using iPhone 6 plus. If I don't reduce the crop area but use the full size and press the Done button, half of the time it will crash the app with error 'Received memory warning.' Sometimes I can even see the white apple logo after the crash but the device is not restarting, it just go back to home screen :)

I have uploaded a sample image that i used here:
https://dl.dropboxusercontent.com/u/9307455/largeimage.zip

from tocropviewcontroller.

ArjunSa786 avatar ArjunSa786 commented on August 21, 2024

hi lori57

please change UIImage+CropRotate.m file

  • (UIImage *)croppedImageWithFrame:(CGRect)frame angle:(NSInteger)angle
    {
    UIGraphicsBeginImageContextWithOptions(frame.size, YES, 1.0f);
    {
    }
    }

hope it help

from tocropviewcontroller.

TimOliver avatar TimOliver commented on August 21, 2024

Oh! That actually did it! I didn't think to look there; I was looking at my actual layout code to try and figure out what was going on. I can't believe I completely missed that.

Anyway, I've updated it in the repo now (I elected to use the image.scale property instead of 1.0f just in case). Please give it a try and tell me if it's working for you now (And I'll reopen this issue).

Thanks again!

from tocropviewcontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.