• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Is Java-to-Android compatible graphics code feasible?

 
Ranch Hand
Posts: 104
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been working with the Apache Commons Imaging folks to make some updates to the API and the question has come up about making the library compatible with Android.  I was wondering if this idea is practical or even desirable.  Does anyone have experience with this issue? What do you recommend?

Commons Imaging is a pure Java language implementation of image-related operations.  I use it because it offers support for the TIFF image format that was not formerly available except through the JAI add in.

As I understand it, the java.awt package is not supported under Android.  That presents a challenge because Commons Imaging uses java.awt.BufferedImage extensively. It also uses Color and some of the more specialized color operations like ICC_Profiles. A few other AWT classes are used to a small degree such as GraphicsDevice, GraphicsEnvironment, etc.


Thanks in advance for your help.
 
Saloon Keeper
Posts: 6995
164
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are many imaging libraries available for Android, but they make use of the Android imaging API rather than Java's AWT classes. So I'm afraid the idea of a cross-platform imaging library is pretty much a non-starter. You should be able to use a C/C++ imaging library like Skia via JNI on the desktop and via the NDK on Android, if native code is acceptable.

What imaging operations do you need on Android that are not available via Android's built-in classes?
 
Gary W. Lucas
Ranch Hand
Posts: 104
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.  I suspected that the situation was going to be pretty much what you described in your answer, but it is good to get confirmation from a knowledgeable person.  
 
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic