473,765 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with reading image file in Firefox

6 New Member
Hi,

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

The function ImageIO.createI mageInputStream returns NULL in Firefox.

The code works fine in Windows Explorer.

--------------------------------------------------------
def getImageFormat( CommonsMultipar tFile imageFile) {

String imageFormat
def file = new File(imageFile. fileItem.name)
ImageInputStrea m imageStream = ImageIO.createI mageInputStream (file);
if (imageStream != null) {
Iterator<ImageR eader> readers = ImageIO.getImag eReaders(imageS tream);

if(readers.hasN ext()) {
ImageReader reader = readers.next()
imageFormat = reader.getForma tName()
}

imageStream.clo se();
}

return imageFormat
}
Jan 29 '10 #1
0 1339

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

Similar topics

0
1452
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 fo2pdf and mime-type application/pdf - using it in
5
1880
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 (works by changing "display" property). Note how you can arrow up and down the page or (if you have it) use your mouse scroll button to move up and down the page.
3
25430
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 http://www.geocities.com/binnyva/code/javascript/jasfer/ The problem that I have is that this script works only in IE. The XML reading part goes fine - but I don't know how to access the DOM sturcture in Firefox. The used code is given below.
2
5429
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 html, you can view its source. When I started using this applet, it worked on my system with Mozila/Netscape, Mozilla/Firebird, Mozilla/Firefox, and Internet Explorer, all running on my WindowsXP system. I was warned that the applet worked...
5
2735
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
5939
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 on most machines, on some machines I experience this problem: When loading the page a window pops up that asks if I want to open the document show_page.asp. When I click "Open" Interdev pops up and opens up a
1
2082
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 compatible in IE, Opera and Firefox. Currently everything works well in IE only. Problem: 1) I can't view an image from a local drive in Opera and Firefox. I am aware that Firefox doesn't link local files, so I set user_pref("security.checkloaduri",...
1
8117
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 - alert(xmlDoc.getElementsByTagName('lab_name').childNodes.nodeValue); I am using Firebug to help me debug. When I look at the DOM right after the page loads the childNodes part of my xmlDoc tree is empty, this explains why I get the error. But why is it empty????!!!!! It...
3
2297
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 using this: $room_type = $_POST;
6
1323
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 ...and wiggy.jpg is in the same directory as the HTML file (a network mount, from which all these browsers were accessing it).
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9399
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9957
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8832
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.