https://graph.facebook.com/1119312148089866/picture?width=80&height=80
using sdwebimage I get image size (26.66666,26.66666)
using NSData *urlData = [NSData dataWithContentsOfURL:url];
UIImage *image = [UIImage imageWithData:urlData];
I get image size (80,80) , which is the correct size according the parameters I sent in url
any ideas what i'm missing here ?
more info:
this was testing on iphone 6 device, I upgrade sdwebimage this week, and I see you scale the image by the scale of the screen device.
so 80..is 26*3 ?
is there flag that ignore this scaling when downloading ?
yes it checks the scale of the device. There is no flag for this yet.
also discussed here: https://github.com/rs/SDWebImage/issues/1476 https://github.com/rs/SDWebImage/issues/1487 https://github.com/rs/SDWebImage/issues/1490
So, I don't understand what I need to do now.
If i have uiimageView of size (50,50) and I want the uiimage of size (80,80) (meaning the server will send 80,80 "file size")
If I download with SDWebImage and get it in scale size of (26,26)
setting this image to UIImageView with UIImageView.scaleToFill will show the same image quality or not ?
If yes, this scale is not needed (why scale twice ?)
If no, so, I need to request with 80 * 3, 80 * 3 ? to get the same quality ? but here there is also scale.
I'm confused and I wasted hours..to find this "bug" :(
just incase I want to disable this my self for now:
check the commit thats responsible for this: https://github.com/rs/SDWebImage/commit/dcde40fc01d2815070a2b4b496234aeb1b6d038e
and revert to the old code
to 2.7.3 ? (in the discussion..I read).
the last is 3.7.5.
this is too old no ?
i did not mean to revert to that commit. i mean to just replace the one line of code it changes back to the one that was before
o.k
sorry for the trouble..I search for this code before (the one line code in the commit ) but did not found it.
what I found (and wrote in message before) is about this method :
(UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image { return SDScaledImageForKey(key, image); }
to
(UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image { return image; } Is enough ?
line 66 file SDWebImageDecoder.m
https://github.com/rs/SDWebImage/blob/master/SDWebImage/SDWebImageDecoder.m#L66
replace with:
UIImage *imageWithAlpha = [UIImage imageWithCGImage:imageRefWithAlpha];
Thanks :)
check the latest commit. the issue should be resolved
Most helpful comment
Thanks :)