I have an android project, and I'm porting some of the project into an Applet based spin off. Is there a similar image manipulation library for android's BitmapFactory that I can use in the applet? I need to specifically load and scale JPEGs and convert them to bitmaps for use as JOGL textures. Any suggestions would be much appreciated.
Related
I want to create a video from a series of images and add a transition between the images (e.g., fade in and fade out). I’m looking for a Java solution and not a C++ one (FFmpeg or anything else).
I checked out JCodec and MediaCodec, but none of those support image transitions.
Have you already tried it with OpenCV for Java? OpenCV offers almost everything you need for such a task. To the transitions you would have to worry about then manually with image blending. But that can be solved with OpenCV too. Just take a look at the documentary
EDIT:
It looks like the Java API lacks the appropriate module that can encode a sequence of images. You can fade images in any case. Take a look at the tutorial. This means you would have to crossfade the images with OpenCV and then use another API (e.g. jcodec) to make a video from the images you create.
I want to know if there is a possibility to use svg graphics with libgdx. I know that Libgdx itself can not handle svgs but is there a possibility with an extension or a method which pre creates PNG's/JPG's out of the SVG's and pass them to Libgdx?
No, currently not supported.
For simple shape rendering you can use ShapeRenderer. You can't parse .svg file because of cross platform support.
For android you can use https://github.com/pents90/svg-android
Also check this thread, It may be helpful.
I work on a big project with codenameone(i can't attach my codes because it's really big). I get android app and it's works on android devices. But recently i get ios build for this project and it's not working on ios device(just showing a white page instead of map).
My project is a map-framework that render tiles and ... on graphics(i used graphics class for drawing, transforming, writing text and more).
I used input stream for working with file because of File not supported.
I need a solution to how debug and find my problem about ios build(why tiles doesn't showed).
In fact i don'n know anything about ios and objective-c.
Thanks in advance.
Most of the logging functionality that allows inspecting issues is for pro developers (you can try the trial) its discussed in this video (mostly focused on crashes): http://www.codenameone.com/how-do-i---use-crash-protection-get-device-logs.html
From your description I would guess you created a really large mutable image (larger than screen bounds) and are drawing onto that. This would be both slow on iOS (and on newer Android devices) and might actually produce that result if the image exceeds the maximum texture size of the device.
If that is not the case you would need to explain what you are doing more precisely.
Is it possible to bend an image or bitmap, like belows, using android's native graphics library?
I have found ImageMagick and JHLabs image processing libraries, which can be used to achieve this type of effect. But, I don't wish to use those complex library to achieve only this effect.
Is there any other simple ways to do this? Also, i've no experiences in android opengl :(
I'm writing a game for Android and I was wondering what kind of images should I use for the in game graphics.
I told the customer to create the artwork in the highest possible (and reasonable) resolution and I will scale it down but I have been told lately that SVG would be better than plain PNG for example since there are a lot of resolutions used by Android devices and the images have to be scaled. Most of the graphics will be stationary backgorunds or objects but there will be some animations. I will use AnimationDrawable for this.
Is there some general guideline for graphical file formats (I checked out android developer site but didn't find anything) or just go with whatever I have at the moment?
I have been told lately that SVG would be better than plain PNG for example
Android does not support SVG natively. There are third-party libraries that support SVG, such as this one.
since there are a lot of resolutions used by Android devices and the images have to be scaled
If that is literally what your graphic designer told you, you need to hire a different graphic designer. Quickly.
Resolution is typically meaningless. What matters is screen size and, more importantly for graphics, screen density. Android supports multiple versions of an image for different densities, and can also resample images from one density into another, so you can "dial in" how many densities you wish to support directly. Here is a blog post from yesterday regarding screen density, and there is plenty of material in the Android documentation on this as well.
Now, your graphic designer might use SVG "internally" and generate density-scaled PNG files for your use -- that is perfectly reasonable.
Is there some general guideline for graphical file formats
Yes, here. It says
Android supports bitmap files in a three formats: .png (preferred), .jpg (acceptable), .gif (discouraged).
There is no native support for SVG drawables but there are libraries that support SVG
See SVG support on Android
You would typically convert SVG images to pixel images for each density. Android also defines some standard sizes for icons like Menu icons
Having the sources for the images you use as SVG is not a bad idea. SVG and other vector based graphics usually scale better to different sizes than pixel graphics. Especially if you need to enlarge an image (for example for the hi-res icons used in the Play store).
Also be careful with AnimationDrawable, it is not meant to be used for fullscreen animations. Just small animated icons and such.