Submit Search
Upload
Xcode 6で利用可能になった ベクター画像リソースを 深掘り
•
19 likes
•
9,883 views
将之 小野
Follow
Xcode 6で利用可能になった ベクター画像リソースを 深掘り (2014/10/05 @ iOS 8/Swift エンジニア勉強会)
Read less
Read more
Software
Report
Share
Report
Share
1 of 14
Download now
Download to read offline
Recommended
デキるプログラマだけが知っているコードレビュー7つの秘訣(DevLove版)
デキるプログラマだけが知っているコードレビュー7つの秘訣(DevLove版)
Masahiro Nishimi
LicensePlist - A license list generator of all your dependencies for iOS appl...
LicensePlist - A license list generator of all your dependencies for iOS appl...
将之 小野
iOSアプリのライブラリ依存管理ツールとして Swift Package Managerを使うのは まだしばらく先かなと思った話
iOSアプリのライブラリ依存管理ツールとして Swift Package Managerを使うのは まだしばらく先かなと思った話
将之 小野
Swiftのこれまでの動向のまとめと 今後のさらなる発展の期待 - iOSDC 2016
Swiftのこれまでの動向のまとめと 今後のさらなる発展の期待 - iOSDC 2016
将之 小野
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
将之 小野
意外と苦労する、一部の画面のみ ランドスケープ表示を許容する方法 (potatotips 第17回)
意外と苦労する、一部の画面のみ ランドスケープ表示を許容する方法 (potatotips 第17回)
将之 小野
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Recommended
デキるプログラマだけが知っているコードレビュー7つの秘訣(DevLove版)
デキるプログラマだけが知っているコードレビュー7つの秘訣(DevLove版)
Masahiro Nishimi
LicensePlist - A license list generator of all your dependencies for iOS appl...
LicensePlist - A license list generator of all your dependencies for iOS appl...
将之 小野
iOSアプリのライブラリ依存管理ツールとして Swift Package Managerを使うのは まだしばらく先かなと思った話
iOSアプリのライブラリ依存管理ツールとして Swift Package Managerを使うのは まだしばらく先かなと思った話
将之 小野
Swiftのこれまでの動向のまとめと 今後のさらなる発展の期待 - iOSDC 2016
Swiftのこれまでの動向のまとめと 今後のさらなる発展の期待 - iOSDC 2016
将之 小野
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
将之 小野
意外と苦労する、一部の画面のみ ランドスケープ表示を許容する方法 (potatotips 第17回)
意外と苦労する、一部の画面のみ ランドスケープ表示を許容する方法 (potatotips 第17回)
将之 小野
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
More Related Content
Featured
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
Featured
(20)
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
Xcode 6で利用可能になった ベクター画像リソースを 深掘り
1.
Xcode 6で利用可能になった ベクター画像リソースを
深掘り 2014/10/05 @ iOS 8/Swift エンジニア勉強会 LT
2.
自己紹介 • Twitter:
@_mono, Facebook: mono0926 • 写真整理・共有アプリSceneのiOS版作ってます • http://scn.jp • LINEクリエイターズスタンプ作って販売中 • ラヴさんスタンプ • 6月のWWDCでのSwift発表直後から継続的に、 Swift・Xcode6で開発してました
3.
ベクター画像指定のやり方概要
4.
ベクター画像指定のやり方概要 PDF書き出しサイズが重要
5.
PDFをプレビューで開くと • PDFはサイズ情報を持つ
• images.xcassetsはそのサ イズ情報をアプリの画像 リソースのサイズと解釈 する • SVGファイルはサイズ情 報という概念が無いので、 この理由でPDFが採用さ れた?
6.
iPhone 6 Plusで実行
PDF書き出しサイズより 画面パーツのサイズが大きいと ぼやける
7.
OSXで実行 ぼやけない!
8.
PDFの扱い • iOS
• ビルド時に@1-3xのPNG画像にラスタライズされる • パフォーマンス考慮 • OSX • 実行時にベクター画像(PDF)をレンダリング • マシンパワーが高めだから? WWDC 2014 Session 411 “What’s New in Interface Builder”より
9.
PDFファイル書き出しは Sketch 3が便利
10.
アプリのバイナリサイズ比較 • @1-3xのPNGファイルを自前で用意
• +13.0 KB • PDFファイルを用いてビルド時にラスタライズ • +26.6 KB 30x30ポイントのこの画像で実験 (@1xで2KB) なぜかPDFの方では約倍のサイズになるが 大抵のケースでは問題にならないレベル?
11.
ラスタライズされてアプリパッケージに 入っているPNGファイルを見てみたい •
images.xcassetsはコンパイルされて アプリ名.app配下のassets.carとして配置される • しかし簡単に中身の見れないファイル形式 (zipなどではない) • ちなみにOSXだと本当にラスタライズされずにPDFがそのまま 入っていました
12.
がんばってassets.carからPNG ファイルを取り出す •
https://github.com/steventroughtonsmith/cartool • CUICatalogクラスのプライベートメソッドを使ってごにょごにょ • これをビルドして出来る成果物cartoolで取り出せる • ./cartool Assets.car output_dir • 本当に、@x対応がされたPNGファイルが入っていました • https://github.com/mono0926/cartool でforkして@3x対応をトライするも成功せず…。
13.
実利用にあたっての注意は? • PNGをそのまま表示するだけなのでパフォーマンスなどは気にする必要無し
• その代償として、iOSアプリの場合は、例えば「iPadでは少し大きめに表示 したい」などというケースでは別途そのサイズにあったサイズで書き出す必 要がある • 実利用していて、まだ特に困った点無いので、どんどん使って良いと思います • Xcode 6でビルドすればiOS7の端末での実行も可能です iOS 6もいけそうだけど、未対応という記事があったりして不明… • もし、どうしても困ったケースが出てきたら局所的にPNG画像使う予定
14.
その他 参考リンク •
Xcode 6 allows VECTOR image assets… any idea how to use them? • USING VECTOR IMAGES IN XCODE 6 • [Xcode 6] Asset Catalog でベクターが扱えるようにな りました! • Xcode6でベクター画像を利用する。 • iOSの@3x対応:Vector画像とImageAssets
Download now