> Why do you put the images in an asset catalog? I use PDFs a lot for icons,
in my case, the "icon" is really a bitmap in the first place.
(It is an image of a painting - I know, this is not the traditional look of
icons.)
> (in my case mostly as Template images). But I just drag them into a gr
Why do you put the images in an asset catalog? I use PDFs a lot for icons, (in
my case mostly as Template images). But I just drag them into a groups in Xcode
and they are copied into the Resource folder. Then you can load them with
-[NSBundle imageForResource:]. If you have @2x version, they ar
I think, I solved the mystery.
Just for the record, in case someone else stumbles across this
(it's probably old news for you guys on this list):
You can use a vector drawing in a PDF , drag it into the asset catalog (not
into the default AppIcon!),
and load it as if it were a regular image , an
➜ identify -verbose status-bar.pdf
Image:
Filename: status-bar.pdf
Format: PDF (Portable Document Format)
Mime type: application/pdf
Class: DirectClass
Geometry: 18x14+0+0
Resolution: 72x72
Print size: 0.25x0.19
Units: Undefined
Colorspace: sRGB
Type: Bilevel
Base type: U
Thanks a lot for your response!
One question: do you have just one PDF file in the asset catalog?
If so, in which "box"? (16x16, .., 256x256?)
>
> Our image is different in the following aspects though:
>
> 1. It's a vector image (PDF)
> 2. In the asset catalog the Preserve Vector Data option i
> Here is the code:
The code is sound, that's exactly what we use and the image is rendered
appropriately.
Our image is different in the following aspects though:
1. It's a vector image (PDF)
2. In the asset catalog the Preserve Vector Data option is checked
3. In the asset catalog the Scales o
Thanks a lot for your response.
For further info: this is what I have in Xcode:
https://owncloud.informatik.uni-bremen.de/index.php/s/T9SrFWNTxRbW83S
> Yeah, the isTemplate definitely shouldn't be set, that would cause that
> issue, I'd have expected setting that to false to fix your issue.
Yeah, the isTemplate definitely shouldn't be set, that would cause that issue,
I'd have expected setting that to false to fix your issue.
I also think there was a feature where NSImage would automatically set the
template flag when an image's name ended in "Template" or something like that.
You
I am trying to define an icon for a very simple status bar menu item.
My problem is that it appears always as black, or not at all, or grey-ish,
depending on what I have tried, but not as intended.
I have populated the asset catalog with icon images of all the required sizes
that work fine in ano