Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 5101862
Votes 0
Synopsis WBMP Image reader tries to load Quicktime MOV files
Category java:imageio
Reported Against tiger-rc
Release Fixed 7(b63)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 6633448 , 6655780
Submit Date 14-SEP-2004
Description



FULL PRODUCT VERSION :
java version "1.5.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
 customer  Windows 2000 [Version 5.00.2195]

A DESCRIPTION OF THE PROBLEM :
The WBMP image reader plugin (included in the J2SE 1.5 RC) accepts Quicktime MOV files which (of cource) are not decoded probably. The plugin should not accept MOV files.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Download a MOV file from www. customer .com or any other source and try to load it with javax.imageio.ImageIO.read
All MOV files that I have are accepted by the plugin.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The plugin should not accept MOV files.
ACTUAL -
A black/white image (abozt 100x3000 depending on the MOV) is produced.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.*;
import javax.imageio.*;

/** Untested source code */
class Test extends JFrame {
  public Test() throws Exception {
    File f = new File("sample_sorenson.mov");
    JLabel label = new JLabel(new ImageIcon(ImageIO.read(f)));
    getContentPane().add(label);
    pack();
    setVisible(true);
  }

  public static void main(String[] args) throws Exception {
    new Test();
  }
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
 xxxxx .
You could unregister the WBMP plugin if you don't need the file format.
(Incident Review ID: 310475) 
======================================================================
Work Around
N/A
Evaluation
Not for tiger.
  xxxxx@xxxxx   2004-09-16
This fix is basically the same as a fix for CR 6331418 (JAI wbmp plugin),
 but here are some improvements for a case when we can't determine an amount
 of data in the stream.

 Now we verify whether give data is a valid wbmp image using following
 checklist:

 1) check WBMP "signature": two first bytes in the stream should be zero.
 2) check that image width and height is greater than zero.
 3) if amount of data in the stream is not known we check whether image 
     dimension does not exceed some upper limit. There is no any limits
     declared in the wbmp spec, and this limit is introduced voluntarily.
     However, it seems to be very unlikely that there are some real
     wbmp images with huge dimension, whereas .mov files are typically
     interpreted as a wbmp image with dimension like 7 x 6000 pixels.
 4) if we know an amount of data in the stream, then we expect to see
     that our estimation of raster data size is equal to the amount of data
     in the stream.
Posted Date : 2009-06-03 09:25:21.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang