Xcode custom symbol image set asset - xcode

From Apples documentation I read:
An alternative to creating bitmap images is to use template images or symbol images instead. Template images specify the shape you want to draw, but not the associated color information. Symbol images are similar to template images but are vector based, so they scale to different sizes. Both types of images simplify the process for supporting Dark Mode. They also reduce the number of image assets you must ship with your app.
Do I understand this correct that I can not use a vector based symbol image set as a replacement for bitmap but scalable?
Update
My situation:
I've an Image Set in my iOS project. There I can add three bitmaps for the three scaling options iOS devices support. Those images must be of type *.png
Now I would like to replace those three bitmaps with a single vector graphic file *.svg. This seems not possible. If I want to use vector graphic images I've to add another asset type called "symbol image set" (Xcode -> Editor -> Add Assets -> New Symbol Image Set).
So far so good but now my question. Those "symbol image set" assets only the the shape but not the color information into account. That's why I would like the "old" way where the color information is taken into account but the file being a vector graphics file (*.svg).

You don't actually need a Symbol Set for what you are trying to achieve.
All you need is a vector image in pdf format, marking it as Single Scale
Then, you can mark the asset as template (meaning you can tint it with any color) or original if you want to retain its original colors.
Finally, note that although you supply vector images, Xcode by default will produce png versions for all scales behind the scenes. If you need to preserve the vector data (which can help in some cases where you need to upscale) you can enable Preserve Vector Data as well.

Related

Image Asset versus Vector Asset

When it comes to adding an icon to my app, there're two main options:
IMAGE ASSET || IMAGE VECTOR
What are the differences between the Image Asset and Vector Asset? What makes them different?
According to Android User Guide :
Image Asset Studio helps you create various types of icons at different densities and shows you exactly where they'll be placed in your project. It includes tools for adjusting your icons and adding backdrops, all while displaying the result in a preview pane, so they appear exactly as you intended.
Vector Asset Studio adds a vector graphic to the project as an XML file that describes the image. Maintaining one XML file can be easier than updating multiple raster graphics at various resolutions.
When you create an image asset it will automatically create a vector graphic that describes that image as an xml file in the drawable..thus you can maintain that one xml file of your image rather than update it in multiple graphics and resolutions.
When you create a vector asset you simply create an xml file that describes an image/graphic in the drawables.

display.newImage() vs display.newImageRect() in corona

What is the difference between display.newImage() and display.newImageRect()?
Which one is better to use?
The documentation of display.newImage() mentions specifically:
NOTE: display.newImageRect() should be used instead to load images
when dynamic content scaling is enabled.
And similarly, on display.newImageRect()
dispaly.newImageRect() automatically substitutes higher-resolution
assets on higher-resolution devices. The actual image chosen will
depend on the current content scale determined by Corona, which is the
ratio between the current screen and the base content dimensions
defined in config.lua.
Based on this scale, Corona uses the
imageSuffix table (also defined in config.lua), which lists the
suffixes for the same family of images, to find the best match from
the image choices available.

Parametric Image Generator

I am looking for a parametric image generator that can for a specified parameters produce different images of the same object (e.g. lobster images where each image contains the same lobster of different fatness).
I need to be able to control parameters (e.g. set lobster's fatness). The image and the object it represents could be basically anything.
Is there any existing library/software that produces such images?
Blender,
Google Sketchup,
Autocad,
3D Canvas,
MeshLab (just for the geometry part)

custom satellite image as background in ggplot

I want to use a satellite image as a background for plotting polygons, points, etc ... using ggplot.
I managed to use google earth imagery with the ggmap function but I'd rather have a false colour composite from my own image as a background. As this image is rather heavy (>2GB) I prepared the false colour composite in Arcmap and exported it as .jpeg with coordinates attached (.jgw) to reduce resolution.
The problem is how I can add this image as a (georeferenced base) layer in ggplot? When importing the jpeg (938 rows and 1743 columns) using readGDAL, a SpatialGridDataFrame is created with the three (RGB) bands.
All help appreciated
The core piece to a ggmap object is just a matrix of colors with some attributes (use the str function on one).
You should be able to read in your jpeg file and create a raster from it, then just change the attributes to match those of a ggmap object (mainly just the class and the bounding box information). You should then be able to use it with the ggmap function.

WP7 XNA: How to change size or style of SpriteFont fonts dynamically in code?

There seems no way to change font size or style in code, right?? It seems the only way is to duplicate the font files and load them all when program starts??
Thanks
SpriteFonts convert a font, with style, size, and other parameters, to a pixel-based format for use as a texture within XNA. Those pixels are static, so yes, there is no way to change them, short of looping through per pixel.
However there is scaling (though it won't look so great scaling larger) to help with size adjustments needed, plus you could, like you said, create multiple SpriteFont files from the same base font for different styles, and dynamically choose one of those sprite font "textures" within your code.
Beyond that, for true fully dynamic runtime usage, you'd need to essentially create these sprite font textures on the fly, in memory. This means you'd have to do what the SpriteFont Content Pipeline project does but at runtime instead. This is possible in WinForms, but as far as I know not really an option for WP7 as you apparently are using.

Resources