Problem in displaying tiff image using java after resizing it using paint and stored in DB
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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.
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.
posted 12 years ago
So what is the size of the modified image? What error do you get when you say "not able to display"? TellTheDetails Saying ItDoesntWorkIsUseless
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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
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
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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?
How are you referencing your image on the page? Can you show us that code?
Raaja Gotluru
Ranch Hand
Posts: 118
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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.
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
posted 12 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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.
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.
| Seriously Rick? Seriously? You might as well just read this tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |








