从图像选择器控制器生成所选图像的较小预览

发布于 2024-08-05 00:14:48 字数 191 浏览 2 评论 0原文

这是我的计划:

  • 用户点击按钮。
  • uiimage picker视图控制器显示
  • 用户选择图像,
  • 所选图像的缩略图视图应保存在我的应用程序中。 (就像选择相册后的 ui 选择器视图一样,有缩略图视图)

我最多可以做三点。但我不知道如何创建所选图像的缩略图视图。

Here is what I am planning:

  • user taps on a button.
  • a uiimage picker view controller displays
  • user selects an image
  • a thumbnail view of selected image should be saved in my application.
    ( like ui picker view has after selecting albums, there is thumbnail view )

Up to three points I can do. But I don't know about creating thumbnail view of selected image.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

滥情空心 2024-08-12 00:14:48

制作一个缩略图大小的小位图。将你的图片画进去。获取位图并将其转换为 UIImage 并保存。

这是一个实现:

iPhone - 多个 CGBitmapContextCreateImage 调用 - ObjectAlloc 攀爬

Make a small bitmap the size of your thumbnail. Draw your picture into it. Take the bitmap and turn it into a UIImage and save it.

Here is an implementation:

iPhone - Multiple CGBitmapContextCreateImage Calls - ObjectAlloc climbing

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文