• 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

Problem in displaying tiff image using java after resizing it using paint and stored in DB

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

I have a requirement where I need to upload a tiff image to a DB and display that image retreived from DB. Which I was able to do with the following approaches using JAI







But the problem is I can upload any image of size 500 KB only (this restriction is at jsp level itself). So if resize that tiff using paint and upload it then I am not able to display that image with the above approaches. I used paint to resize before upload because it is readily avalaible in windows and the user dont need any extra knowlege or skill.

Can any one guide me in acheiving this.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But the problem is I can upload any image of size 500 KB only (this restriction is at jsp level itself). So if resize that tiff using paint and upload it then I am not able to display that image with the above approaches. I used paint to resize before upload because it is readily avalaible in windows and the user dont need any extra knowlege or skill.



So what is the size of the modified image? What error do you get when you say "not able to display"? TellTheDetails Saying ItDoesntWorkIsUseless
 
Raaja Gotluru
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Maneesh,

Thanks for the reply.

I am not getting any exception. Just in the browser its showing an red X mark. Nothing else. No message in the console or in browser.

The size of the image after resize is 492 KB. original size is 2.51MB
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Browser. Red X mark. That would indicate the referenced image not being available. You say tiff but you got
How are you referencing your image on the page? Can you show us that code?
 
Raaja Gotluru
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Maneesh,

This is the code I am referring in JSP. I dont have any problem in displaying other image formats. I am even able to display the tiff, if it is not resized. Only problem is if I resize and upload then it is not displaying. As browsers are not supporting tiff to display, I am converting temporarily to jpeg and displaying. In DB it will be as TIFF only.




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

In continuation to my question. Is there any change in the type of the image it is creating if we use editors like paint. (Type means the format it creates the tiff image.) Why I am asking this is I am able to display the tiff after resizing using the following code but if I use paint and store then I am not able to. But I cannot go with this approach as we have restriction at the jsp level itself that image size should not be more than 500 KB.

reply
    Bookmark Topic Watch Topic
  • New Topic