Photoshop tvOS LSR extension gives error - icons

We're trying to create a tvOS application icon for our new tvOS application. We've downloaded the necessary extensions and the example .psd. We've tried to generate a preview using the plugin but it keeps saying it's missing a background layer.
I've added the layer, named it background, and locked it, but the same error keeps popping up.

I haven't used the photoshop plugin, but what it probably means is that at least one layer has to be the right size (e.g. 400x240) and has to be opaque.
Also, for what it is worth, you don't need to create a separate layered image unless the layers are of a different size. You can just drag the individual layers directly into the assets.

Related

I am using Xamarin.Forms for a cross platform project and I need to use Google drawables nine-patch images for my Google Sign in Button

The thing is I tried using https://baskren.github.io/Forms9Patch/ but I feel like I don't fully grasp it.
Don't get me wrong, the tool is great it does stretch the 9patch images. It's just that I can't get the buttons to look properly based of Google brand guidelines.
https://developers.google.com/identity/branding-guidelines
The way it should look
And this here are the drawables I am using :
https://developers.google.com/identity/images/signin-assets.zip.
Here are the results of different button tries and dimensions
This is the code that got me the closest to the button I want
<f9p:Button Text = "Sign in with xxhdpi"
TextColor="White"
FontSize="14"
FontFamily="sans-serif-medium"
WidthRequest="60"
>
<f9p:Button.BackgroundImage>
<f9p:Image Source="{local:ImageMultiResource TestingApp.Resources.Images.btn_google_signin_dark_normal_xxhdpi}"/>
</f9p:Button.BackgroundImage>
</f9p:Button>
I tried using a grid with image and button as well but it didn't work out.
It would be awesome if someone would point me in a proper direction.
I've actually done this before. Here is a general outline of what I did:
Put your multi-platform icon files into your .NetStandard project as Embedded Resources. This means that I found all of the various resolutions provided by Google (_xxhdpi, _xhdpi, _hdpi, _mdpi, etc) and then renamed them to the following:
icon#¾x.png
icon.png
icon#1½x.png
icon#2x.png
icon#3x.png
icon#4x.png
And then put them in to the Resources/Google folder in my project (FormsFirebase.Ui). So, for example, the EmbeddedResourceId for the first file, in the above list, is FormsFirebase.Ui.Resources.Google.icon#¾x.png.
As you will see in a moment, renaming these files, as shown above, will allow Forms9Patch.Button to pick the right image for the right screen resolution (so it will look great) - freeing you from having to manage this. Likewise, putting them in the .NetStandard project means they are available for all platforms - freeing you up from having to figure this out multiple times!
In your Forms9Patch.Button, refer to the above icon image in a resolution independent fashion. This can be done a couple of ways. One of the more verbose ways is:
var myButton = new Forms9Patch.Button
{
Text = "Sign in with xxhdpi",
TextColor=Color.White,
FontSize=14,
FontFamily="sans-serif",
WidthRequest=60,
IconImage = new Forms9Patch.Image
{
Source = Forms9Patch.ImageSource.FromMultiResource("FormsFirebase.Ui.Resources.Google.icon", GetType().Assembly),
Padding = 1,
},
Spacing = 4,
TintIcon = false,
BackgroundColor = Color.FromRGB(81,134,236)
};
A couple of things to Note:
First, I set TintIcon to false in order to not tint the icon to the same color as the TextColor. Also, I set IconImage, not BackgroundImage. This is to be sure the image is a peer to the text, rather than in a layer below it.
Also note that I am able to set the padding of the IconImage as well as the Forms9Patch.Button.Padding and the Forms9Patch.Button.Spacing (the distance between the IconImage and the Text or HtmlText, depending on if HasTightSpacing has been set to true).
Instead of using multiple .png files (for each screen resolution), if you have .svg version of your image available, you can use that instead. Much less work!
Another thing you might be interested in: Just as Forms9Patch handles images in a platform independent fashion (by putting them in a cross platform project as Embedded Resources), it can do the same thing with Fonts. This means you can put a font file (.ttf or .otf) into your cross platform project and use its EmbeddedResourceId as the value for FontFamily. And this behavior can be extended to Xamarin.Forms elements by use of the Forms9Patch.EmbeddedResourceFontEffect.
Now for a bit of proselytization (please forgive me if this does not apply to you): I see that you used XAML for your sample code. Notice I didn't in my response. If you are new to .Net and/or Xamarin.Forms, I would highly recommend not using XAML. Don't get me wrong, XAML is great - it's just not for beginners. Why? There's just too many things going on under the covers that, as a beginner, will trip you up and slow you down. Rather, I would recommend you write all of your UI in C# so you can learn to manage your properties and learn how binding really works. Once you have mastered making very efficient layouts with the best "context appropriate" use of binding, then you're ready for XAML. For me, the real test was being able to make very a complex cell layout in a large list in a ListView smoothly scroll on a low-end Android phone. After that experience, I was able to take advantage of all the benefits of developing in XAML (and there are many) without worrying about being shackled by my novice mistakes.

Properly handling embedded images in Xamarin.Forms while using Live Player

Building and deploying on the real device takes ages. Xamarin Live Player is great and handy, but has some harsh limitations. I want to use the embedded images approach, that is working when the solution is built and deployed but falls into those limitations of the Live Player, and I am getting such exceptions:
[LogEntry: Time=2018. 05. 04. 9:42:31 +02:00, Level=Error, Title=Visualization Error, Message=Object of type 'NInterpret.InterpretedObject' doesn't match target type 'Xamarin.Forms.Xaml.IMarkupExtension' (TargetException)]
Is there any simple workaround to make the application show in Player? I could happily live with not showing the image at all (or at best showing a placeholder instead) when using Player and have the image shown as expected when using the regular flow.

Is it possible to combine 2 images together into one on watchOS?

I am upgrading my watch app from the first version of watchOS. In my first version I was placing UIImageViews on top of each other and then rendering them with UIImagePNGRepresentation() and then converting it to NSData and transferring it across to the watch. As we know there are limited layout options on the apple watch so if you want cool blur effects behind images or images on images they have to be flattened off screen.
Now when I re-created my targets to watchOS2 etc suddenly the images transferred via NSData through [[WKSession defaultSession] sendMessage:replyHandler:] come up with an error saying its too large of a payload!
So as far as I can see I either have to work out how to combine images strictly via watchkit libs or use the transferFile option on the WKSession and still render them on the iPhone. The transferFile option sounds really slow and clumsy since I will have to render the file, save to disk on iPhone, transfer to watch, load into something that I can set on a WK component.
Does anyone know how to merge images on the watch? QuartzCore doesn't seem to be available as a dependency in watch land.
Instead of sendMessage, use transferFile. Note that the actual transfer will happen in a background thread at a time that the system determines to be best.
Sorry, but I have no experience with manipulating images on the watch.

DirectShow - order of adding filters causes image to look strange with Microsoft Lifecam Studio

I'm working on a video capture application using DirectShow and have noticed certain problems. In particular, with a Microsoft LifeCam Studio camera, the following strange situation occurs:
If the order of adding the capture filters is: video capture first, then audio (camera microphone), then the image from the camera gets a strong pinkish tint - looks like a black and white image run through a color transform to make it pink.
If I swap the order of adding the filters: audio (microphone) first, then video, then the problem goes away.
I've first noticed this in my application but have since verified that the same happens in Graph-Edit.
Is there any reasonable explanation for this phenomenon?

Force system cursor usage in Flex

Let's say that you're using some black box library (i.e. no source code) that sets your cursor to something when rolling over a certain sprite. You can override that by catching rollOver and rollOut events, blocking propagation and using the CursorManager.
Question: is there a way to tell the CursorManager to use the system cursor?
Obviously, I could feed the CursorManager some "system like" cursor, but this would look weird if the local settings are different from that icon, which is likely to be always.
thank you!
f
You can create your own version of CursorManager - just create file mx/managers/CursorManager.as, copy it's content from default manager (use Ctrl+Shift+T to navigate to it) and change the code.
If you use RSLs then you need to create monkey-patch and load it BEFORE RSLs.
if you embed SDK into code then you can simply compile the app and class will be replaced.

Resources