473,396 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem with reading image file in Firefox

Hi,

Is there anybody who knows why my following java/Groovy code does not work in Firefox?

The function ImageIO.createImageInputStream returns NULL in Firefox.

The code works fine in Windows Explorer.

--------------------------------------------------------
def getImageFormat(CommonsMultipartFile imageFile) {

String imageFormat
def file = new File(imageFile.fileItem.name)
ImageInputStream imageStream = ImageIO.createImageInputStream(file);
if (imageStream != null) {
Iterator<ImageReader> readers = ImageIO.getImageReaders(imageStream);

if(readers.hasNext()) {
ImageReader reader = readers.next()
imageFormat = reader.getFormatName()
}

imageStream.close();
}

return imageFormat
}
Jan 29 '10 #1
0 1314

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: MicFra | last post by:
hi, i got a little problem with pdf-serializing after updating from cocoon 2.1.2 to 2.1.4. following scenario: - using serializer org.apache.cocoon.serialization.FOPSerializer, with name...
5
by: The Googler | last post by:
Here is the site in question: http://dev.unmeaningflattery.com/ Open it in Firefox (this problem does not occur in IE). Click on one of the image thumbnails to see the larger image appear...
3
by: binnyva | last post by:
Hi everyone. I just made a JavaScript program to read a RSS feeds and display it in a HTML file. The script - Jasfer or JAvaScript FEed Reader - is available at...
2
by: Nick Wedd | last post by:
Here is a test page http://www.maproom.org/maps/historical/droysens/1886/testj.html which uses a Java applet to take a .DjVu format file and display the image which it encodes. The page is simple...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
23
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine...
1
by: ntombikayise | last post by:
Hi, I urgently need help. My code should let a user select an image file for upload, view the image on the browser to be able to set the image size then upload the image. It should also be...
1
by: awolfe76 | last post by:
The xml and javascript are below. IE finds everything fine, Firefox gives the following error - xmlDoc.getElementsByTagName("lab_name") has no properties on this line -...
3
by: macca | last post by:
Hi people! I'm having a problem with a file upload script that I'm writing. It works with Firefox but not Internet explorer. When the form is submitted(to it's self) it check for a file upload...
6
by: Tim Streater | last post by:
The statement: myImage.src = "wiggy.jpg"; appears to be a no-operation in FireFox 2.0.0.14 under XP. Works fine in IE7 (XP) and on the Mac under Safari and FF. myImage points to an <img...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.