Open GoogleCodeExporter opened 8 years ago
E.g. suppose a response contains this:
"photo":[
{
"id":"8532443967",
"description" : { "_content" : "Some creative description" },
"secret":"bedb46f09c",
"server":"8233",
"farm":9,
"title":"IMG_5354",
"isprimary":"1",
"dateupload":"1367452900",
"url_l":"http:\/\/farm9.staticflickr.com\/8233\/8532443967_bedb46f09c_b.jpg",
"height_l":"768",
"width_l":"1024",
"url_n":"http:\/\/farm9.staticflickr.com\/8233\/8532443967_bedb46f09c_n.jpg",
"height_n":240,
"width_n":"320",
"url_z":"http:\/\/farm9.staticflickr.com\/8233\/8532443967_bedb46f09c_z.jpg",
"height_z":"480",
"width_z":"640",
"ownername":"cvsaphotos"
},
Even though the width and height of the large image are available, these values
don't seem to be parsed.
photo.getLargeSize().getSource() =
http://farm9.staticflickr.com/8233/8532443967_bedb46f09c_b.jpg
photo.getLargeSize().getWidth() = 0
photo.getLargeSize().getHeight() = 0
Original comment by mthom...@gmail.com
on 16 Aug 2013 at 11:12
in PhotoUtils, method createPhoto
there are sections dealing with sizes e.g.
urlTmp = photoElement.optString("url_l");
if (urlTmp.startsWith("http")) {
Size sizeT = new Size();
sizeT.setLabel(Size.LARGE);
sizeT.setSource(urlTmp);
sizes.add(sizeT);
}
there is no setWidth and setHeight called on sizeT object ... it would be nice
if sizes were set there
Original comment by norbert....@gmail.com
on 18 Aug 2013 at 11:32
Yes sorry, so this is really 2 issues:
1) setWidth() and setHeight() aren't being called for the Size instances when
parsing a photo.
2) There's no Size instances available for some of the image sizes (e.g. the
"medium 640" size). Only an image URL is available.
For 1) there's another API specifically to get the available image sizes of a
photo, but we'd rather avoid needing to make more API calls if the info is
already available and just needs to be parsed.
Original comment by mthom...@gmail.com
on 19 Aug 2013 at 10:25
[deleted comment]
The first issue was fixed by this pull request:
https://github.com/yuyang226/FlickrjApi4Android/pull/14
It doesn't address the second issue though.
Thanks!
Best Regards,
Mark
Original comment by mthom...@gmail.com
on 3 Sep 2013 at 7:31
Original issue reported on code.google.com by
mthom...@gmail.com
on 16 Aug 2013 at 9:27