Ladies/ Gentlemen
We are building a flash based product where we need to create icons for various modules. we are having challenges in look and feel of the icons- what looks really good on Adobe Illustrator/ Photoshop looks jagged on flashPlayer. A challenge we have is that the overall screen aspect ratio and hence aspect for the icons which are relatively sized can change
we were told in discussions with some adobe folks that
a) we need to build icons which are square, and in multiples of 32 pixels.
b) use a png format
As per them, this way the pixelation is reduced and diagonal lines won't appear jagged- we still have an issue on rendering in flash player
Any ideas/ guidance on how to approach this?
6 hours and no answer?
Here's the magical property you want: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Bitmap.html#smoothing
Just make that true, either via the setter, or via the constructor.
Related
Assuming a simple product demo e.g. the one found on http://www.sublimetext.com/
i.e. something this isn't traditional high res video and could be reasonable accomplished with:
animated gif
video (can be embedded youtube, custom html5 player, whatever is most competitive)
canvas
The question is, which performs better for the user? Both in terms of:
The size of the files the user must be downloaded to view the 'product demo'
The requirements in terms of processing power to display the 'product demo'
If you feel that there's a superior technology to accomplish this or another metric to judge its usefulness, let me know and I'll adjust accordingly.
I know it's already answered, but as you specifically referred to the Sublime Text animation I assume you're wanting to create something similar?
If that's the case then here is a post explaining how it was created by the Sublime Text author, himself:
http://www.sublimetext.com/~jps/animated_gifs_the_hard_way.html
The interesting part of the article is how he reduces the file size - which I believe is your question.
With a simple animation such as the one at the link you're referring to, with a very low frame rate, a simple animated-PNG of animated GIF will probably be the best solution.
However, you need to consider band-width factor in this. If the final size of the GIF or the PNG is large then probably a buffered video is probably better.
This is because the whole gif/png file needs to be downloaded before it shows (I am not sure how interleaved PNGs works when they contain animation though).
A video may be larger in file size, but as it is typically buffered you will be able to show the animation almost right away.
Using external hosts such as YouTube or others can be beneficial to your site as well as the band-width is drawn from those site and not from your server (in case you use a provider that limits or charge for this in various ways).
For more information on animated PNGs or APNG (as this is not so well-known):
https://en.wikipedia.org/wiki/APNG
The canvas in this is only a displaying device and not really necessary (an image container does the same job and can also animate the GIF/PNG whereas a canvas cannot).
If you use a lot of vectors then canvas can be considered.
CSS3 animation is also an option for things such as presentation slides.
I am working on a game and I need to have two characters talking to eachother. I know that XNA does not allow me to play a movie other than fullscreen so I need to actually "play" the animation inside my game app in a different manner. The characters have animated environments around them so the animations are not simple head movements and as such, animating the characters via keyframing in a 3d model is not an option. The dialogue between the two characters is a cut-scene between levels, so it is not part of the gameplay itself.
I am not sure what the best approach to this would be so if you have any ideas, please let me know.
This is what I thought of so far:
1. Create all the individual frames for the characters as images. Load these images in a spritesheet and go through each frame at my desired framerate.
The problem with this approach is that the maximum spritesheet texture of 2048x2048 would not allow for too many frames as the characters are something around 300x200. The other problem is that I have two characters so, the minimum scenario would require me to create in memory two 2048x2048 spritesheets... and I'd like to keep the memory requirements low.
2. Load a batch of frames (images), play them, then de-allocate them and load the next set. I know that in general it is not a good idea to load lots of small textures and switch between them in drawing calls (performance wise) but it seems as though I have no other choice in this case.
I am afraid that unloading stuff from memory and loading other stuff in while in the Update-Draw loop would slow down the entire scene... so not sure if this is a sane approach.
The other idea is to make an mp4/wmv with the whole thing [char animation, subtitles of the dialogue, etc] but the interface that hosts these characters would not be as "smooth" as when rendered directly, etc...
Thank you for all your suggestions,
Marius
EDIT 1:
I have tested scenario number 2 and it seems that the performance is OK.
I have used scenario 2. It works for my particular case but I am sure it won't work for all cases.
I am looking for an image generator for images that:
Look like cogs, wheels, progress bars, etc.
Spin.
Are small, less than 20-30 pixels. 16 might be good, i.e. 'icon size'
Are simple, just 2D no need for 3d image.
All the examples I found are large 3d ones. I want one of those little ones that I can use with things like ajax while loading up a bit of the page, transferring a file, sending a large message, etc.
The android spinning gear cog is one example.
Then I can show/hide the image as I need.
I figure a lot of people will have tackled this / know good solutions.
You can generate simple animated "loading" icons on http://www.ajaxload.info
For fancier ones, try http://preloaders.net or http://www.loadinfo.net
Fontawesome (version 3) includes a few spinning icons.
http://fortawesome.github.io/Font-Awesome/#examples
I'm sorry if my question is somewhat vague. It's been a few years since I did anything with Qt, and back then I never did any fancy image stuff. What I'm asking for below is just some general suggestions on which classes to consider using. I'm trying to avoid barking up the wrong tree from the very start.
The situation: I'm writing a Qt-based program in which I need to display a somewhat large (let's say 5000x5000) raster image. The user should be able to zoom (quickly) in and out, and pan around the image in a way similar to for example Google maps. So far, this is not very different from the Qt ImageViewer example, except perhaps for the requirement that zooming happens quickly. However, I need to draw on the order of 50k simple geometric shapes (let's say circles) on top of the image, and be able to add and remove some of these in a simple way. The circles should have the same size no matter the zoom level, and should thus either be redrawn whenever the user zooms, or should be drawn with vector graphics. Think of the circles as map annotations. These should look the same at any zoom level, and also behave nicely with respect to panning.
I guess my question is twofold:
Can Qt draw vector graphics on top of a raster image?
In general, which classes should I consider for the above?
Thanks in advance. I don't like answering vague questions myself, but maybe someone with experience with Qt's graphics capabilities has an answer.
I suggest you use QGraphicsView and friends for this. It helps handling all the view/world transformation and the vector items can be achieved with various QGraphicsItems.
You can change the sizes of the items whenever the zoom level changes to maintain constant apparent sizes.
hope this question is ok on stackoverflow. I want to use a photo as the background for the homepage of a website. The photo will be take up the entire page. However i don't know what resolution i should make the photo. I was thinking 1920 x 1200px so that people with 24 inch screen don't see the 'ends' of the photo. However is that big enough? I'm worried about the site looking ok on screens larger than 24 inches.
Also anyone know how i should optimize the photo so it loads as fast as possible? Thanks.
Overall, this seems to be a question of trade-offs. The better the resolution, the slower the page load for a do-nothing page. Is it worth the slow-down to have the better resolution and avoid pixellation?
Also, I think you're asking the wrong question, since a 24-inch screen can be in multiple resolutions.
I would approach this in the following manner:
what is the largest resolution you MUST have your photo look "good" on? Then make your photo that resolution. If 24" is your target, look at what resolutions this size monitor "typically" supports and target that.
What number of colors you want? (or perhaps b&w / grayscale). If you reduce the number of colors (preferably to "web-safe" colors), you can load faster with the same resolution.
A program like Photoshop (or Gimp) will probably give you the most power in tuning these parameters.
Do you care if only a portion of the photo displays when your viewer has a smaller window?
I know this isn't a cut and dried answer, but these things seldom are (IMHO).
For a solution that will work on most modern browsers, you will need to place the image in a div with a z-index less than the rest of your page (see: Stretch and scale CSS background)
As far as creating a 1920x1200 photo that will compress to a small size, I would recommend trying a smaller size (e.g. 960x600) and see if it looks okay on your 24-inch screen. There are many programs that will let you specify file size for your compression (e.g. FastStone Resizer) so you can experiment and see what is acceptable. In general, photos with less detail and/or color-depth will compress better.
Another problem you are going to run into is aspect ratio. Even assuming that your web-site is always opened in a full screen browser and not a window, sometimes that screen is going to be 16:9 ratio and sometimes 4:3. You could try to create an photo that has a nice 4:3 ratio "sweet-spot" in the center and adjust your div using some Javascript based on the current window aspect-ratio.