• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Image Rotation

 
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I used the below code to rotate the images. But this is not supporting TIFF formats. I heard that JAI will be used for rotating TIFF images. Could some advice how to download JAI jar and any samples to rotate



 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean you can't *store* the image as TIFF. Rotating an image in memory is independent of the format in which it will be stored later (if it's even going to be stored).

You don't need JAI, you need TIFF support for ImageIO. That is provided by the Java Advanced Imaging Image I/O Tools.

By the way, storing an image in BMP format with a JPG file extension is rather strange.
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf,

I tried with the below code and its rotating the image and saving it as out file but still am getting the exception



I my client machine in UNIX and I dont want to install the native lib. Please advice to override this error

 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Getting strange warning about not loading mediaLib

In case you see a warning message like the following when running your application:

Error: Could not load mediaLib accelerator wrapper classes. Continuing in pure Java mode.

Occurs in: com.sun.media.jai.mlib.MediaLibAccessorcom.sun.media.jai.mlib.MediaLibLoadException

This means that you did not install properly the native libraries and then JAI is working in pure JAVA mode.


Forcing Pure-Java mode

JAI can be run without its native acceleration layer without loss of functionality. This may be accomplished by setting the JVM switch com.sun.media.jai.disableMediaLib to true, which means starting the JVM adding the following parameters:

-Dcom.sun.media.jai.disableMediaLib=true



Still my client is not accepting to chnage JVM settings. As a result this may cause some other issues. Please assit me with some other suggestions.
 
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought JAI was Java Advanced Imaging?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JAI is just about dead. I'd advise to go with the original code, and then to use ImageIO for handling TIFFs.
 
reply
    Bookmark Topic Watch Topic
  • New Topic