Export Flash as Transparent MOV - wpf

Is it possible to export a flash movie with a transparent background as a .MOV.
I don't mean for embedding in a website, I mean the actual .MOV (or .avi).
What I'm trying to accomplish is that I have a flash animation that I want to embed in a WPF application. I don't want to use a Browser within the WPF because of all of the issues that surround the browser control (has to be topmost control, etc).
So my solution was to export said animation as a movie and play it in the MediaElement control. The only problem is that I need the background to be transparent, and I can't find a way to do this.
Any suggestions or alternative solutions would be most welcome.

The comment above:
in the Flash IDE:
File > Export > Export Movie > ...choose Quicktime format > tick 'Ignore stage color(generate alpha channel)'
and you're done.
This works for actionscript generated graphics too. Not much code there.

I found an interesting thing that worked! In the dialogue box you need to change the type of export to 'animation' if you have made an animation. Simply ticking 'ignore stage colour' did not work until I had changed the type of .mov to a animation.

Related

GIMP: Animated GIF not White

I exported a bunch of png files from R. The pictures are of a dataset that is 'spinning' against a white background. I then use GIMP to stitch them together and export an animated gif. Unfortunately, the gif has a yellowish color instead of a white background like the original files. This yellowish color was not there when I used to do this in imageMagick and isn't even there when I preview the files in GIMP. It only appears after I do the export as a gif. Does anybody know what is going on and how I can correct this?
GIF files are limited to 255 colors. If you don't downsacle colros prior to exporting them, GIMP will do that automatically at the export step itself. It is at this point that your yellowish background is being created.
The workaround is quite simple: convert your image to the indexed color model before exporting the GIF file (image->mode->indexed) ( perceive you could even force a custom crafted palette at this step). If after this conversion the backgroound is already yellowish, you can manually redefine it on the Color Map dialog (search for it on the Windows->Dockable menu) - pick the background color, and change it for white.
When exporting the Indexed image to an animated GIF there is no color conversion step, and the colors of the GIF are saved as they are seen on the screen
The issue here is GIMP is trying to do its best to convert your image down to 255 colors, and that is where it is failing. What I recommend for people on OSX is to get this program called ImageAlpha (it is free) https://pngmini.com/. It does a very good job and compressing png images without much loss. If anybody has a recommendation for a Windows app that would do this, please post it here for reference.

How do you design an image for Codename One TouchCommand?

I am 2 days in experimenting with Codename One and Mobile development in general and tested out some basic navigation and features so far. Now I want to work on the look and feel of the app.
I looked at the 9-border vid which was helpful, but not sure of the best way to add an image for the touchCommand that takes 3 tabs on that bar ( Example: home, profile, settings.. Similar to how instagram's TouchCommand is at the bottom of the app).
If I add the image, it does not line up with my Commands.
What is the best way to approach this to ensure the "TouchCommand" image appears as one, but is broken up to 3 parts for each individual commands when pressed, home, profile and settings? I might be asking this all wrong, forgive me as this is all new to me.
Thanks.
EDIT:
This is what was done.
In Theme -> Constants added commandBehavior= bar . This gives the default bar at the bottom. Created in photoshop a new bar 300x80 and added it to the TouchCommand. (See ScreenShot 1). Took this bar and broke it up in photoshop into 3 different buttons for the tab press etc. In GUI Builder, added Home, Profile, Settings in the commands. Added the image to Press Icon for Home and it didnt line up (screenshot 2). Very Frustrating to design layouts. I am hoping there is a much better technique as I am still experimenting with Codename one?
What is unclear to me, is I cant find any documentation on how to approach this and what the dimensions of each image should be as it seems that codename one has issue aligning them. I am assuming the steps would be to create the background image and add the icons as interactive layers for the user. I really care for the image being pressed and changes color like the instagram example. I dont see a way to do this in codename one GUI builder and themes.
EDIT:
Okay, I have decided to use tabs instead of the bar at the bottom. If I add my image to it, I get the results (screeshot 3). Is this the right method to use to accompolish what I want? If so, I dont see a way yet to alter this to become what I want :( .
Plus adding the background, shows one size in the display and looks different in the simulator. (screeshot4)
Answered Here: How do you get ActionBar from SocialBoo theme to show up in your GUI?
Tabs are customized individually so the border should apply for an individual tab to create the background. The foreground element is the icon which you define in the Tabs component itself thru the icons property which allows you to define 3 icons for the 3 tabs (assuming you use the GUI builder). If you add the tabs via addTab in the code you can specify an icon there.

winforms messagebox background colour

I am new to winforms and I want to keep things simple
When I create a message box: I notice the top half is white background while the lower half is grey (!!!)
(what I really want is all background white).
But even the VisualStudio dialog doesn't behave this way
Can someone please help me?
Do I need to write some custom code ?
I would post the image but not allowed;(
Thanks
MessageBoxes are displayed by the operating system. If the options that are available aren't good enough, then you have to make your own form.

How to Play Transparent background avi file in media element?

I have a video with transparent background in .avi format (Made from Adobe After Effects), but the transparent background appears black in mediaelement. Media Player has no background property also.
What should i use so that this media element plays the file and when placed on an image takes that image as its background. (No i cannot embed that image in the avi file as my image keeps changing).
*If my approach is wrong please let me know.
I'm afraid using the normal wpf media player this can't be done.
The mediaplayer ignores the transparent regions, even with video formats that accept it. From memory, i dont think AVI files support transparent regions. MOV files do.
Having said that, and although it could be a very complicated task, it may be possible to enhance the WPFMediaKit mediaplayer to do what you want.
http://wpfmediakit.codeplex.com/
J Morrill the author of wpfmediakit may be able to let you know if it is possible or not.
I might add that i got around this problem in a project once by using a sequence of .png files that played a short 10 second movie. Of course this is not an ideal solution, but it got me out of a jam
Another workaround is to use color keying - assing a color (or more colors) in your video, which you translate to the transparency by a WPF Effect(BitmapEffect or ShaderEffect).

Get path geometry from image

If i have a logo, let's say done as a jpg or even a png. Any suggestion for how I can use that to define a path geometry? It would be really good if any suggestions could be provided for how i can do it in blend.
Thanks
Yes - I just tackled this problem for an LOB application two days ago.
I can't offer advice for Blend (though I've read that it can be done in Expression Designer). However, the best free tool I've found for this is called InkScape (http://www.inkscape.org).
It's opensource, and while it's intended primarily for editing SVG vector-based images, it has two key features that are useful to us WPFers:
It can vectorize (i.e. "trace") raster images like bitmaps and jpegs, albeit not as well as one would hope, and
It can export the vector image as XAML
You'll invariably find that you get better results from loading vector formats (like SVG, EMF, WMF, etc) and saving to XAML, than if you try to convert a bitmap/jpeg... simply because the process of vectorizing a raster image is error prone at best. So if you want to bring a company logo into XAML, try to get hold of the source files used to create the logo (perhaps done in Illustrator?) and import that into InkScape.
If this post is helpful, please be kind and give it a one-up.
Jasema is a terrific tool right for the job.
Also, don't be shy to use Blend - it is somewhat more difficult to use (drawing shapes using pen) but it gets easier pretty fast. Switch on gridlines and optionally snap to them for good results.
What both Jasema and Blend are lacking, is the ability to easily create shapes with a central symmetry (like stars), so I took parts from Jasema and created my own tool (named Radius) that works a bit like a combination of a ruler and compass.
I have a good idea but you're png, bmp, jpg or other non vector file is must be very simple because we need best scan results and only use inkscape.
Step: Drag and drop your file workspace on Inkscape, download free.
Tip: If your image is color white, Top menu item File->Document Properties-> heck Checkerboard Background and if you want uncheck Page border show.
Step: Top menu item Path-> Trace Bitmap-> Mode check what you want property, i usually use color property and if your file is png check Remove Background then click OK, then wait again Ok button is Enable and close window.
Step: Now you have a two layer, top layer vektor file and bottom layer your file. Select vector file and top menu item Edit-> XML Editor-> select svg path and look side column, d name propery in your data path value.
But this method may not always work or may not give the desired results and draw your own shapes with the scape so you can get the path data from the XML editor.
Example, my first tests this like:
and after working on it some more:
I've solved my problem (export an image as XAML) using Microsoft Expression Design 4 (Free Version). I've downloaded from the link
http://www.microsoft.com/en-us/download/confirmation.aspx?id=36180
As input, I had Adobe Ilustrator files.
Adobe Illustrator / CorelDraw is perhaps the best tool out there for these operations that I have used.
Personally, I prefer illustrator for on-screen media. These tracings can be exported into several formats such as EPS, SVG, AI, or even XAML (with this plugin)
Best of Luck !!!!
I have recently been struggling with this myself. I had a set of icons done in data and needed to update them to look nicer.
I tried everything, manually typing them out. drawing in svg, converting svg to xaml.
in the end i found a list of open source icons from google material icons.
I then used this to convert from the svg files to data
https://github.com/BerndK/SvgToXaml
It works well but not for the icons i drew myself.
I decided to place all the icons data i convert into an app i built myself that will give you the data and a preview of the icon. feel free to use and contribute. I will keep updating as much as i can.
https://github.com/sgreaves1/XamlIcons
Convert your image from png to svg in online converter, then drop file into this site http://inloop.github.io/svg2android/ and you will see pathData of your image like below shown in my image.

Resources