cocos2d, how to upscale images automatically for iPad - xcode

I was wondering if there is a way to upscale image automatically for iPad and if so how. Or if it is recommended to do individual images how do I make cocos2d recognized iPad images?

Upscaling images is not recommended. For the simple reason that you won't gain any quality (in fact, you'll lose some). Scaling on the fly via scale property can be done, but again you lose quality and in this case also performance.
Instead, use a tool like TexturePacker, design your images in the highest possible resolution and allow TexturePacker to handle the export and downscaling (that's ok) of your assets to the lower resolutions.
Raj already answered the file suffixes.

Use following extension for image.
background.png - for iPhone SD (480x320 )
background-hd.png - for iPhone HD (960x640 )
background-ipad.png - for iPad ( 1024x768 )
background-ipadhd.png - for iPad ( 2048x1536 )

Related

quickest way to add image watermark on video in andorid?

I have use ffmpeg and mp4parser to add image watermark on video.
both works when video size is small like less than 5MB to 7Mb but
when it comes to large video size(anything above than 7MB or so..)
it fails and it doesn't not work.
what are the resources that helps to adding watermark on video quickly. if you have any useful resources that please let me know?
It depends on what exactly you need.
If the watermark is just needed when the video is viewed on the android device, the easiest and quickest way is to overlay the image with a transparent background over the video view. You will need to think about fullscreen vs inline and portrait vs landscape to ensure it lines up as you want.
If you want to watermark the video itself, so that the watermark is included if the video is copied or sent elsewhere, then ffmpeg is likely as fast as other solutions on the device itself. If you are able to send the video to a server and have the watermark applied there you will have the ability to use much more powerful compute resource.

Appcelerator - Saving image to a file from ImageView with fixed resolution

I am trying to save the content of an ImageView into a file and save it as an image. The simple code snippet which I am using is:
writeImageToFile(imageView.image);
The function writeImageToFile, saves the blob in a file which contains the image displayed in the image view. All good and fine till here.
Now the point noticed in here is that, I have defined the ImageView with the width and height as 150dip. After saving the image into a file, for iPhone 5, we find that the image resolution is 300x300, and for iPhone 6 Plus it is 450x450. The image resolution varies with the screen density, which I can understand.
But my query is that is there any way to always keep the resolution fixed to 150x150 pixels. Am not sure if this is possible out of the box with Appcelerator or do we need to use external modules.
Note: This is also applicable for Android too.
You can use the Blob functions to check the image size, then decide if you need to resize. You can use imageAsResized (http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsResized) to make a 150x150 image.

Xcode 6 - Images Xcassets - Images size and devices Resolutions

I am trying to understand what's going on with the new resolutions on all iPhones Devices (including 6,6+).
I read this one http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions but I still don't understand what's going on.
For example:
I have an image view which it should be full screen on each iPhone above iPhone 5. I created an Image Xcasset with 3 sizes: #1x, #2x and 3#x.
What image sizes should I add in Xcasset to support iPhone 5,5S,6,6+?

Concerns about resolution size Xcode

I have two images, one image is 320 x 480 called image.png and while the other is 640 x 1096 called image#2x.png. Will my app get rejected for not being exactly twice as big as the original? I have no choice it would seem if I need to fit the image on iPhone 5. Any tips or suggestions will be most appreciated.
Your naming convention is incorrect.
There is a strict rule of image file naming.
For iPhone 3G/3GS with resolution 320x480, your image should be named as image.png
For iPhone 4/4S with resolution 640x960, your image should be named as image#2x.png
For iPhone 5 with resolution 640x1136, your image should be named as image-568h#2x.png
This question is a duplicate of --> iPhone 5 - what naming convention the new images have to follow?

Image and video fullscreen?

)
I have a application to show some videos and images.. like a presentation.. The images have different resolution's and the videos to. I want to put the images and the videos in full screen mode but without lose quality.. The rotation of screen is fine, but the media content does not appear like they should..
Basically i want to show the images centered in vertical and horizontal without lose quality..
Suggestions?
For the video I would recommend using a MediaElement with the Stretch attribute set to 'Uniform'. 'Uniform' takes up all the space that you give the control but it ensures that the video maintains its aspect ratio. You should still have all the qaulity possible because the stretching happens on the GPU and it does a great job. You can see an example here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.aspx
Now, if you want the video to only scale up to it's orignial size but not get blown up any larger, then just set the Stretch property to 'None'.
The Image control works the same way and also has the same Stretch property. See the Image class documentation and sample here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.image(v=VS.95).aspx
Did you try the MediaElement API and the NaturalVideoHeight and NaturalVideoWidth properties?

Resources