Comments (8)
是的,目前 [YYImage imageNamed] 这个方法只支持从 Main Bundle 中查找单个图片,而且也没有缓存。
如果用 assets 来管理图片的话,还是推荐用 UIImage。
from yyimage.
那如果用YYImage,项目就不能用Image.xcassets了么,我只是疑问,因为xcassets里还是有很多设置可以操作的
from yyimage.
是啊。。assets 里有很多苹果自定义的配置,而且也不能支持 WebP 之类的东西。。所以还是推荐用 UIImage。。
以后有时间我会试试看能否做一下兼容。
from yyimage.
使用yyimage 支持 svg 和pdf 格式的图片吗?
from yyimage.
目前不支持。
ImageIO 解码 SVG/PDF 有问题。PDF 倒是可以用其他系统方法解码成图像,但是再编码回 PDF 就不行了。
from yyimage.
恩 pdf的系统能够通过[UIImage imagenamed:"xx"] 可以进行加载 用SVG的时候 我使用了 SVGKit中 SVGImage 来加载 发现效果不是那么令人满意。
from yyimage.
之所以能够用 [UIImage imagenamed:"xx"]
来加载 pdf,是因为打包时 Xcode 把 PDF 转换成了 PNG。。
SVG(和 PDF)都是很复杂的格式,第三方库支持一般都不会太完善,而且这些矢量图的绘制,会随着图像的复杂程度增加而消耗更多的 CPU 资源(想想 Flash 在 PC 上的表现)。这在 PC 上不是什么大问题,但在移动端就难以控制了。
from yyimage.
恩恩 好的明白了。
from yyimage.
Related Issues (20)
- How to set loop for playing APNG ??? HOT 1
- AssetsLibrary and MobileCoreservices deprecation warnings in Xcode 11.4 HOT 2
- Crash on image encoding (WebPPictureImportRGBA) HOT 1
- iOS 14.0 YYAnimatedImageView 无法显示正常图片 HOT 7
- iOS 14 YYAnimatedImageView加载图片失败 HOT 13
- Crash on YYImageCoder.m
- How to solve “ImageIO Crash” ?
- Subclassing YYImage
- 'YYImageCoder.h' file not found when "generate_multiple_pod_projects=YES"
- Problems using lib in simulator HOT 4
- 加载本地沙盒路径下面的webp图片
- 能否添加 图片格式互转的功能
- retain cycle
- ios16 crash
- runtime error: load of misaligned address 0x0001231acc1d for type 'uint32_t' (aka 'unsigned int') HOT 2
- Adapting to libwebp 1.3.2 will crash when calling YYCGImageCreateEncodedWebPData HOT 1
- 能播放json文件吗 HOT 1
- 加载webp图片颜色显示不对 HOT 1
- Upload Privacy Policy HOT 1
- 苹果隐私清单是否需要支持,Does the Apple Privacy List(PrivacyInfo.xcprivacy) need support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yyimage.