Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6324901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:47:35+00:00 2026-05-24T16:47:35+00:00

I am using SDWebImage to load images into my table view. I would like

  • 0

I am using SDWebImage to load images into my table view. I would like the images in my table view to be resized and have round corners. I found UIImage+Resize and UIImage+RoundedCorner to do this. Both libraries works great seperately but I have not been abl to combine them. I could resize and round the corners of the image SDWebImage returns but I have found this to be fairly resource heavy and therefore I would like to have the images resized before saving them to the cache.
When an image is loaded from the net for the first time it is probably shown before being saved to the cache therefore I would also like to resize the image when it is loaded for the first time.

I have not been able to do this as I cannot figure out which method of SDWebImage to manipulate the image in. All I need is to call the following on the right UIImage in SDWebImage.

UIImage *image = [image thumbnailImage:50 transparentBorder:0 cornerRadius:5 interpolationQuality:kCGInterpolationHigh];

Can anyone tell me where in SDWebImage I should place this piece of code to have the image manipulated before being saved to the cache and have a manipulated image sent to the image view when it is loaded from the internet and not the cache?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:47:37+00:00Added an answer on May 24, 2026 at 4:47 pm

    I figured this out.

    You should manipulate the image in the following methods in SDImageCache.m:

     1. - (void)storeImage:(UIImage *)image forKey:(NSString *)key;
     2. - (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk;
     3. - (void)storeImage:(UIImage *)image imageData:(NSData *)data forKey:(NSString *)key toDisk:(BOOL)toDisk;
    

    In the third method you must remember to convert your UIImage to NSData using the code below. This should be done if toDisk is true.

    NSData *croppedRoundedImageData = UIImageJPEGRepresentation(croppedRoundedImage, 1.0);
    if (croppedRoundedImageData) data = croppedRoundedImageData;
    

    Using if (croppedRoundedImageData) data = croppedRoundedImageData; your app will not crash if your data is NULL when you try to save it.

    In SDWebImageDownloader.m you must add your code for manipulating in - (void)connectionDidFinishLoading:(NSURLConnection *)aConnection This is used for the first load of the image (when not in cache)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using SDWebImage to load images into my table cells - however the images
Using Rails 3.2.0 with haml and sass: I Would like to link an external
I am using the SDWebImage library to cache web images in my app: https://github.com/rs/SDWebImage/blob/master/README.md
I am using SDWebImage to populate my Tableview with Images (downloaded and displayed). What
I am using the SDWebImage open source project for loading images asynchronously. I can
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
I've gotten far enough to find out I should likely be using SDWebImage for
Using android 2.3.3, I have a background Service which has a socket connection. There's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.