As android doesn't support TIIF fromat, so I want to convert a .tif image to .png image in android.
Is there any library or code that can help me out?
whatever i get is not saufficient for this conversion.
i would try http://www.schaik.com/png/tiff2png.html and convert his .c file to .rs so that it works on all android platforms. Or better yet just do the conversion before it gets to the phone.
Related
I want to use vector asset in android studio to generate svg xml file,
I convert my png to svg in this web site
but when I use this svg file in vector asset to generate xml file, I get following error message
It display "could not generate a preview"
How can I fix it?
Most of the complaints on this topic are due to people trying to convert SVGs that use features of the SVG standard that are not supported by VectorDrawables. And the SVG to VectorDrawable converter in AndroidStudio only supports those limited features. It doesn't really give much feedback when it encounters things it doesn't support.
Some of the online converters try a bit harder. You might have better success with them.
Otherwise you may have to simplify your SVGs to get them to work.
If you need to display SVGs images that are more complicated than VectorDrawables can handle, then you can always consider using an SVG rendering library for Android. IMHO the best one is AndroidSVG (disclaimer I wrote that one).
There are some cases when your actual .svg file name contains some capital letters. Just rename them in all small letters and try to upload it.
For instance:
If actual .svg image name is mySavedimage.svg {here 'S' is capital which is against norms of android assets}. SO if you rename that file to my_saved_image.svg then this will work as a charm.
hope it helps.
I've never had any luck with those convert sites. You're better off using photo tools to create an SVG. Make sure to follow the SVG guidelines from Android listed here
The error is in the converter. The SVG file might not be proper.
You need to use photo editor tools like Photoshop or Gimp.
I can't find any documentation or example code on how to create an animation file in the WebP format on Android. I know how to encode one WebP image from a Bitmap. I also know there exists a webpmux command line utility to combine multiple WebP images into one WebP file containing multiple frames. What I don't know is how to do this from Java code.
I'm perfectly happy with using a high version Android SDK, 4.3+ is fine, which means WebP should be fully supported.
I am working in a game which is using AndEngine to develop.I successfully use .jpg and .png files in this.But I face too much problems when I trying to use Maya Animated files (which are in .max extension) and also .obj files. Can anyone please suggest me how can I use .max files. Or at least .obj files in my programs.Hope everyone understand my problem clearly. Thanks in Advance
I am not entirely sure: But AndEngine is a 2D game-engine while .max and .obj files usually describe 3D object/animations. For example obj files can contain vertexes, while AndEngine is not capable of using vertexes directly (although, some extensions might).
What I am sure of: you can always make little screenshots of your Maya animation and put them all in a row in a png file and use the png image instead.
I'm trying to decode a jpeg that is in CMYK color format. BitmapFactory returns null. I googled around but with no luck. Is it possibile Android team did not the right job supporting all kind of color format?
I'm using Android 2.2.
Thank you so much.
Found the solution: loading the JPEG using the external library libjpeg compiled with NDK. It has been a hard work, but I did it!
It's very possible I'd say:
http://code.google.com/p/skia/issues/detail?id=69
I am looking into Renderscript capabilities and stuck with the A3D (Android 3d) file format. I can't find an easy way to convert a Collada file into an A3D format to store my blender model.
I was wondering if you guys have an idea I could try maybe?
Does anyone have a working code sample so that is can see what im doing wrong?
More info: http://developer.android.com/reference/android/renderscript/FileA3D.html
Edit: Not to be mistaken for the Asci3d file extention ( also *.a3d )
As of Ice Cream Sandwich (perhaps earlier) there is a tool in the Android source to convert between Collada and A3D.
The tool is called a3dconvert; you can browse the source online here (in the ICS branch): https://github.com/android/platform_development/tree/ics-mr1-release/tools/a3dconvert
Usage:
a3dconvert input_file a3d_output_file
Currently .obj and .dae (collada) input files are accepted.
This tool has been removed as of newer releases (Jelly Bean, it looks like). This probably because the graphics portion of Renderscript has been deprecated.
I'm not sure A3D is a good format but if you have to write a converter here is a description of both formats:
http://scorpion.tordivel.no/help/UsersGuide/General/ImageOperations/ImageFormats/ImageFormats_a3d.htm
http://en.wikipedia.org/wiki/COLLADA
And here is some sample code to read Collada:
http://sourceforge.net/projects/colladaloader/
If you're going from Blender to A3D, I would consider writing a Python script to go directly to A3D format from Blender. The A3D format seems rather simplistic and if you're only accessing the Mesh data, the Blender API isn't too hard to follow. Of course if you don't already know it, you'll have to pick up some Python syntax.
I knew nothing of Python when I first wanted to pull some information from Blender myself, and looking at existing .py scripts (like the OBJ export), the Blender API and learning some basic Python syntax I was able to write my first (rather simple) script in just a few hours or so.
http://colladablender.illusoft.com/cms/ is a project making a plugin for Blender to read Collada directly.
Also, Carrara could be used to convert your files to something Blender supports.