-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supported input formats? #4
Comments
Hi, currently only PNG and we used to support SVG. The reason it was dropped is because the quality of rendering SVG and vector graphics in general changes drastically from tool to tool. In other words if the SVG was produced in Illustrator, then Illustrator would probably render the raster version in the most accurate way. From our testing from all of the tools that can render SVGs, browsers render it the most accurately (rsvg, imagemagick does a horrible job) but still we found browsers to not support all of the features Illustrator may use. I suggest the next steps can be -
|
Thanks for your quick response. Unfortunately I can't share the exact files, but I asked our artist how they are created - here are simple sample SVG and PDF files in the style of how they would appear in our app. We currently receive our files in both SVG and PDF as part of our contract, and we've used the PDF files until now (because Xcode supports simply dragging & dropping them into an asset catalog). I also played around a bit with different tools to try and convert the files like you said, and found quite a few problems (e.g. imagemagick just produced a black circle on the above SVG sample file). One tool I tried that works reasonably well is svgexport but it also had issues with the viewport. Maybe if there are so many problems with SVG, PDF could be supported instead? I tried the simplest possible example using imagemagick on my sample images, |
Yep, your experience with SVG is exactly where we stood a year ago, unfortunately :( I think using PDF - if it renders as perfectly as you say, completely makes sense - thanks for the research! |
I think for PDF support converting the images wouldn't even be needed most of the time. I just looked in one of our project's asset catalog and all the image sets except for the App icon are using the PDF directly, with {
"images" : [
{
"idiom" : "universal",
"filename" : "Header bottom.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} |
So I just double checked this, and looks like you're right. This behavior is both nice and strange, I'm wondering why would I need 3 different sizes, for example, given I supply a vector (non-raster) art with PDF. Some more interesting findings from my googling around: To summarize, from these, looks like Xcode does scaling up from 1x PDF render version, and that scaling up may result in artifacts in gradients. More over, the rendering engine is Quartz, which may or may not be rendering differently than the software that the designer used. |
Yeah, using blade could be overkill for this. However, some projects might still benefit from it e.g. if you have assets coming from different artists, where some might not be using vector graphics but others are. A unified pipeline would be nice there, even if it means that blade would just be putting the PDF files into the correct folder. Also, I believe the launch images and the app icon still need to be available as PNG in all the correct sizes, etc. Blade could support automatically converting these files if the source is PDF. |
Is there a list somewhere which image formats are supported as source? For example, can I use the SVG or PDF files my artist sends me directly?
The text was updated successfully, but these errors were encountered: