Choosing right live tile type - windows-phone-8

I'm a bit confused about what kind of tile I should choose to make my scenario work.
Scenario is as follows: my application supports small and medium tiles. By default in both these modes it shows an app icon on transparent background but user can choose a particular image to be a tile cover. When tile is covered with image I don't want it to flip or move - just a static image with app name on top of it.
I've tried TemplateCycle with app icon as default and user's selected image as an alternative but cycle tile moves these images up and down all the time and I don't want that. I've was considered TempalteIconic but it turned out it only supports images with transparent background so no option for user's image. So what kind of tile should I choose?

Use a normal fliptile but don't set anything(text, image) on the back. It won't flip if you do that.

Related

Camera Orientation - HTML5

I'm creating a mobile web application (HTML5/JavaScript/CSS only) that allows a user to take a picture. The picture from the camera is then loaded into a canvas HTML element. The user may rotate their phone when taking a photo so ultimately I want to rotate the output appropriately. Is there a way in a web page only to determine which degree a user has rotated when taking a picture? I'm not simply talking about whether they are in landscape mode. I'm meaning if you hold your phone straight up in portrait mode face it down at your desk (its now parallel with your desk) and then rotate it to landscape. This will not trigger an orientation change, but you will now be holding your phone in a "landscape" position if that makes sense. This will be a common way users will be taking the photos. I want to be able to rotate the image appropriately when uploading it.
Thank you
Is there a way in a web page only to determine which degree a user has rotated when taking a picture?
Yes there is! When photos are taken, they contain metadata - information about the image. This is called EXIF data.
It tells you things like the make of camera, whether the flash went off, and - usefully for you - the orientation of the camera.
If you are using JavaScript to draw the image onto the canvas, I can recommend BlueImp's JavaScript Load Image Library
Once you have loaded the image, you'll be able to do a call like:
var orientation = data.exif.get('Orientation');
That will tell you which way the camera was held when the photo was taken. Depending on the phone, you may also get rotation data, GPS data, compass heading, etc.

How can I avoid my windows phone tile icon being used as an alpha mask?

I am making a windows phone 8 app and I'm trying to make a nice tile for the start screen, so I opened my WMAppManifest.xml in Visual Studio, selected TemplateIconic and imported the desired image. My problem is that it's using my image as an alpha mask, so all the colours it has are simply transformed into white. I'd like to conserve all the colours from my image.
How can I avoid my tile icon being used as an alpha mask?
Go to WMAppManifest.xml and set Tile Template as TemplateFlip.

Windows Phone 8 tile doesn't show correct image

Does anyone know why my Win Phone 8 app tile doesn't show the icon I set? This is what I get (and yes, am am sure that's not my app's icon):
This is what I have so far and I ran out of ideas of what can be wrong:
The small icon is a png of 110x110
The medium icon is a png of 202x202
Both images have the build Type = Content
Both images have the copy to output property = Copy if newer
The application icon is the same as the small icon and it shows alright in the program list.
Here is a part of my app's manifest:
<TemplateIconic>
<SmallImageURI IsRelative="true" IsResource="false">Assets\Icons\AppIcon_small.png</SmallImageURI>
<Count>0</Count>
<IconImageURI IsRelative="true" IsResource="false">Assets\Icons\AppIcon_medium.png</IconImageURI>
<Title>
</Title>
<Message>
</Message>
<BackgroundColor>
</BackgroundColor>
<HasLarge>false</HasLarge>
<LargeContent1>
</LargeContent1>
<LargeContent2>
</LargeContent2>
<LargeContent3>
</LargeContent3>
<DeviceLockImageURI IsRelative="true" IsResource="false">
</DeviceLockImageURI>
</TemplateIconic>
If you use TemplateIconic tile the images need to be transparent icons as outlined in Iconic Tile template for Windows Phone 8 because it is just going to end up being a white icon inside a tile. Your image appears as a white square because it does not have any transparency. With the images you have, you would want to use the TemplateFlip tiles and adjust the size of your tiles accordingly.
I had the same problem.
After a lot of brainstorming I tried this and woah it worked!
Check if the image you are setting has a white (or other) background color. If it has, remove the background from the image using Photoshop(Tool: magic eraser) and keep the background transparent.
Replace this transparent background image and it will show up in emulator!
Hope this works at ur end too! :)
Did you look at the manifest file? You can choose the images in that file. I mean using the UI in the studio, open the manifest file and choose the image.
According to Iconic Tile sizing info in Iconic Tile template for Windows Phone 8, both small icon and medium icon must be design with transparent background.
The small icon is a png of 70x110
The medium icon is a png of 130x202
If you need to set the background color, set the BackgroundColor in WMAppManifest.xml as follow.
<BackgroundColor>[hex ARGB format color]</BackgroundColor>
I work with Xamarin.Forms (Shared) for my WP-app and also had problems to implement the Tile in the WP-part of my project.
To set the background to transparent to the tile image have done the job.
But I have used images with 158x158 and 336x336 what also works and allows to use the standard-icon (in a higher resolution) what - I think - most users want to do.
I have created a short description for all visitors, who use XF for WP-development (including app-icon, splash-screen and Tile).
How to add app-icon, splash-screen and Tile in a WP 8.0 XF-project

Metro App StorageFile GetThumbnailAsync Background

In a Metro App, when retrieving the Thumbnail of a StorageFile using the GetThumbnailAsync() method, the Background Color is a Dark Blue/Navy Blue.
Is it possible to override this Color? I would like the Background to be Transparent.
From the documentation,
The thumbnail is an icon on a background of appropriate size. The background color is determined by the app that is associated with the file.
Combined with the following note:
Note If the associated app is a Windows Store app, the app's tile background color is used.
If your app has an association with the file, just make sure your apps Background color is Transparent (not 100% sure you can do that, actually).
The other option is to use something like WriteableBitmapEx to find every pixel of the tile color, then turn those pixels to Transparent. Shouldn't be too absolutely terrible, but will have an overhead (naturally).
Hope this helps and Happy Coding!

comparing image in cocos2d-x

I'm making a game with cocos2d-x HTML5.
On one layer there are two images which is almost same but have several different area and when I click one of them, if the clicked area of two images has a different pixel, I want to add a sticker to the same location to both images.
I want to ask that how can i compare the image pixel on cocos2d-x HTML5?
and how do I make the click event to place the sticker?
Probably CCImage class will help you.
What I suggest is, as you already have 2 images, and you have know the different area,
you can create a plist Dictionary recording the area position and size.
In your game scene, you can add transparent touchable Sprite created from your config list file, and set a color to it when it is touched.