Skip to content
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

Memory problem with many pictures #36

Open
kozik opened this issue Oct 9, 2013 · 1 comment
Open

Memory problem with many pictures #36

kozik opened this issue Oct 9, 2013 · 1 comment

Comments

@kozik
Copy link

kozik commented Oct 9, 2013

Hello, I have a problem with the memory managment. I get a memory warning after scroll about 50 pictures. In total, they have about 270 of them, each weighing approximately 100 kb and is different from others. I tried to resolve this problem by issue # 6, but nothing helped. Please help me. Regards Kozik

@mstudiopl
Copy link

Hello, we solved it this way:

  1. when creating the source, load images using [UIImage imageWithContentsOfFile:]
  2. in file EGOPhotoImageView.m in method (void) setPhoto: (id ) aphoto, change the code to:
if(self.photo.image) {
        CGSize newSize = CGSizeMake( self.photo.image.size.width, self.photo.image.size.height );
        UIGraphicsBeginImageContext( newSize );
        [self.photo.image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
        UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();

        self.imageView.image = newImage;
} else {

Best regards! http://mstudio.pl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants