Yelp API ios 获取更大的图像 [英] Yelp API ios getting a larger image

查看:26
本文介绍了Yelp API ios 获取更大的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在将 Yelp API 用于我的项目,我需要获取要用作背景的企业图像,并显示在 UIImageView 中.但是,从得到的图片来看,所有的图片都太小了,所以背景很模糊.我使用此代码获取当前的商业图片:

I am currently using the Yelp API for my project, and I need to get the image of a business to use as a background, displayed in a UIImageView. However, all the pictures are too small from the pictures obtained, so the background is blurry. I use this code to obtain the current business images:

[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[businessDict objectForKey:@"image_url"]]]];

有没有办法获得更大的图像?

Is there anyway to obtain a larger image?

推荐答案

将图片 URL 末尾的文件名替换为 o.jpg,您将获得 1000×1000 像素.其他尺寸为:

Replace the filename at the end of the image URL with o.jpg and you'll get up to 1000×1000 pixels. Other sizes are:

  • s.jpg:最大 40×40
  • ss.jpg:40×40 平方
  • m.jpg:最大 100×100
  • ms.jpg:100×100 平方
  • l.jpg:最大600×400
  • ls.jpg:250×250 平方
  • o.jpg:最大1000×1000
  • 348s.jpg:348×348 平方
  • s.jpg: up to 40×40
  • ss.jpg: 40×40 square
  • m.jpg: up to 100×100
  • ms.jpg: 100×100 square
  • l.jpg: up to 600×400
  • ls.jpg: 250×250 square
  • o.jpg: up to 1000×1000
  • 348s.jpg: 348×348 square

这篇关于Yelp API ios 获取更大的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆