i am making a game with a background and animated helicopter that is flying.When i see other iphone games their backgrounds are so graphically strong ,mine is not near to that .Why is that?
Are there any special type of images used in iphone?
JPG, PNG, BMP, etc are all capable of being displayed fine on an iPhone.
Keep an eye out for:
If you are resizing the image (in either direction), it may lose detail.
If you are not using the full bit-depth - e.g. if you are only using 16 colours.
If you are highly compressing JPEG images, which is a lossy format.
Of course, if your source image looks bad, it will continue to look bad.
Related
Does Firemonkey have an image manipulation library? Right now I'm doing everything with Canvases and it sucks.
I have a program which currently loads the image into a TBitmap, performs its operations, and then saves the TBitmap object out to a file.
The TBitmap interface however is not ideal. Among the problems...
It silently scales down images which are larger than 8k pixels in any dimension, losing resolution on large .png files
It scales the image whenever there are clipping issues with DrawBitmap which is undesirable (I'd much rather it clip the output or just crash)
Rotating bitmaps is very hard to predict the output of and may scale the image.
I want a better option than canvas methods for image manipulation. I see there are units under Vcl.Imaging, but I can't find anything similar under the FMX units.
The operations I'm really looking for are just drawing lines, text, zooming, rotating, blitting to the display, saving, and loading.
I have an application (openCV - C++) that grab an image from webcam, encode it in JPG and trasmitt it from a Server to Client. Thwebcam is stereo so actually I have two image, LEFT and RIGHT. In the client, when I recieve the image I decode it and I generate an Anaglyph 3D Effect.
For do this I use the OpenCV...
Well I encode the image in this way:
params.push_back(CV_IMWRITE_JPEG_QUALITY);
params.push_back(60); //image quality
imshow(image); // here the anagliphic image is good!
cv::imencode(".jpg", image, buffer, params);
and decode in this way:
cv::Mat imageRecieved = cv::imdecode( cv::Mat(v), CV_LOAD_IMAGE_COLOR );
What I see is that this kind of encode generate in the Anaglyph image a "ghost effect" (artifact?) so there is a bad effect with the edges of the object. If look a door for example there a ghost effect with the edge of the door. I'm sure that this depends of the encode because if I show the Anaglyph image before encode instruction this work well. I cannot use the PNG because it generate to large image and this is a problem for the connection between the Server and the Client.
I look for the GIF but, if I understood good, is nt supported by the cv::encode function.
So there is another way to encode a cv:Mat obj in JPG withou this bad effect and without increase to much the size of the image?
If your server is only used as an image storage, you can send to the server the 2 original stereo images (compressed) and just generate the Anaglyph when you need it. I figure that if you fetch the image pair (JPEG) from the server and then generate the Anaglyph (client-side), it will have no ghosting. It might be that the compressed pair of images combined is smaller than the Anaglyph .png.
I assume the anaglyph encoding is using line interlacing to combine both sides into one image.
You are using JPEG to compress the image.
This algorithm optimized to compress "photo-like" real world images from cameras, and works very well on these.
The difference of "photo-like" and other images, regarding image compression, is about the frequencies occurring in the image.
Roughly speaking, in "photo-like" images, the high frequency part is relatively small, and mostly not important for the image content.
So the high frequencies can be safely compressed.
If two frames are interlaced line by line, this creates an image with very strong high frequency part.
The JPEG algorithm discards much of that information as unimportant, but because it is actually important, that causes relatively strong artefacts.
JPEG basically just "does not work" on this kind of images.
If you can change the encoding of the anaqlyph images to side by side, or alternating full images from left and right, JPEG compression should just work fine.
Is this an option for you?
If not, it will get much more complicated. One problem - if you need good compression - is that the algorithms that are great for compressing images with very high frequencies are really bad at compressing "photo-like" data, which is still the larger part of your image.
Therefore, please try really hard to change the encoding to be not line-interlacing, that should be about an order of magnitude easier than other options.
I am looking for ways to layer multiple 1080p Videos with transparency on Windows in C++ and DirectX or Opengl. The videos will start at different moments in time. Ideally the videos can be blended with another render target with other game content, so the resulting video texture should contain transparent pixels.
Can this be done with EVR and hardware acceleration? Which codecs are supported? http://en.wikipedia.org/wiki/Media_Foundation mentions transparency, but does not answer my questions. It sounds as if all the videos have to start at the same time and the resulting video texture has no transparency.
TIA
Christoph
This are my research results from around 03/14 with no definitive answer to this problem.
I did not try the mentioned possibility in Media Foundation, since it sounded as if the result has no transparency.
I was able to use a second gray scale video to mask the rgb video inside a shader. This can be done with a separate video stream, but syncing is needed. Moreover it is possible to encode a video with two frames side by side, but many HW accelerated video codecs do not allow this, WMF being the exception. Performance is not great but I was able to play 3 1080p30 videos simultaneously.
On a side note, to my surprise Flash was able to play 5+ 1080p30 videos with transparency simultaneously. The flash video codec allows alpha values, but I managed only inside flash to use them.
I'm looking for a way to display videos in a 2D game. The videos need to support an alpha-channel so they can be overlayed on top of the other game elements.
Currently I just have a series of PNG files which are decompressed and then flipped through for the animation. This works, but it is a massive memory hog; a 1024x1024 animation that is 5 seconds long at 24 frames per second takes up well over 400MB. And I'm targeting embedded systems, so this is really not good.
I've been looking for some video codecs that can support these requirements, yet so far all I've really been able to come up with that support RGBA are licensed under GPL, so we can't use them in a commercial product.
Any such beast(s) out there?
Most codecs don't support an alpha channel - the only one I can think of is the QuickTime animation codec, which isn't very popular.
If you only need binary alpha channel (transparent or not) then setting the top bit of one of the color channels is a common approach.
If these are animation type frames then something like MJPEG might work well and there are lots of LGPL licensed mjpeg libs
In my Game i'm loading around 13-15 Png's which include few sprite sheets(6-7) of 2048x2048 dimension and others 1024x1024 and some 512x512.
and now i'm facing the huge memory warning.
There is no way for me to reduce the number of sprite sheets in my game :(.
So, m thinking to convert all the 2048x2048 sprite sheets from png to pvr.ccz format.
Is that the optimal solution or Some thing else is there, which i'm completely missing?
Any help would be highly appreciated.
If all the PNG/texture images have to be available for each frame, then each will be stored uncompressed in texture memory and thus the memory problem. No GPU (to my knowledge) can render directly from a compressed PNG (or JPG for that matter) image.
The only options are to drop to, say, 4444 colour or to use PVRTC (probably at 4bpp).
[Update: WRT PVRTC, I'm assuming this is an iphone game.]