Maximum image size with createImage() in applet

hi,
I am making a simple Horizontal scrolling stocks ticker. I made an offscreen image with all the companies,prices etc on the image and just change the x position of the image. My problem is that when the data increases the applet fails to create the offscreen image.Giving the following error:
com.ms.com.ComFailException: (0x80004005) Unspecified error
at com/ms/awt/peer/INativeImage.create (INativeImage.java)
at com/ms/awt/image/ImageRepresentation.offscreenInit (ImageRepresentation.java)
at com/ms/awt/image/Image.<init> (Image.java)
at com/ms/awt/ImageX.<init> (ImageX.java)
at com/ms/awt/WComponentPeer.createImage (WComponentPeer.java)
at java/awt/Component.createImage (Component.java)
at ticker.init (ticker.java:97)
at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.run (AppletPanel.java)
at java/lang/Thread.run (Thread.java)
When the image width goes above 32767 this error props up. Also even if the image size is less than 32767, while scrolling if mouse or any other window comes over the applet the whole applet starts behaving funny i.e. the image scrolling on it disappears or gets converted into a rainbow.
Please advise . Any help/comment is welcome. Thanx in advance .

I'm having the same problem, did you ever find a solution for this?

Similar Messages

  • Rotate Image Created with createImage() ?

    I've been looking around online for a way to do this, but so far the only things I have found are 50+ lines of code. Surely there is a simple way to rotate an image created with the createImage() function?
    Here's some example code with all the tedious stuff already written. Can someone show me a simple way to rotate my image?
    import java.net.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class RotImg extends JApplet implements MouseListener {
              URL base;
              MediaTracker mt;
              Image myimg;
         public void init() {
              try{ mt = new MediaTracker(this);
                   base = getCodeBase(); }
              catch(Exception ex){}
              myimg = getImage(base, "myimg.gif");
              mt.addImage(myimg, 1);
              try{ mt.waitForAll(); }
              catch(Exception ex){}
              this.addMouseListener(this);
         public void paint(Graphics g){
              super.paint(g);
              Graphics2D g2 = (Graphics2D) g;
              g2.drawImage(myimg, 20, 20, this);
         public void mouseClicked(MouseEvent e){
              //***** SOME CODE HERE *****//
              // Rotate myimg by 5 degrees
              //******** END CODE ********//
              repaint();
         public void mouseEntered(MouseEvent e){}
         public void mouseExited(MouseEvent e){}
         public void mousePressed(MouseEvent e){}
         public void mouseReleased(MouseEvent e){}
    }Thanks very much for your help!
    null

    //  <applet code="RotationApplet" width="400" height="400"></applet>
    //  use: >appletviewer RotationApplet.java
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    public class RotationApplet extends JApplet {
        RotationAppletPanel rotationPanel;
        public void init() {
            Image image = loadImage();
            rotationPanel = new RotationAppletPanel(image);
            setLayout(new BorderLayout());
            getContentPane().add(rotationPanel);
        private Image loadImage() {
            String path = "images/cougar.jpg";
            Image image = getImage(getCodeBase(), path);
            MediaTracker mt = new MediaTracker(this);
            mt.addImage(image, 0);
            try {
                mt.waitForID(0);
            } catch(InterruptedException e) {
                System.out.println("loading interrupted");
            return image;
    class RotationAppletPanel extends JPanel {
        BufferedImage image;
        double theta = 0;
        final double thetaInc = Math.toRadians(5.0);
        public RotationAppletPanel(Image img) {
            image = convert(img);
            addMouseListener(ml);
        public void rotate() {
            theta += thetaInc;
            repaint();
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                                RenderingHints.VALUE_INTERPOLATION_BICUBIC);
            double x = (getWidth() - image.getWidth())/2;
            double y = (getHeight() - image.getHeight())/2;
            AffineTransform at = AffineTransform.getTranslateInstance(x,y);
            at.rotate(theta, image.getWidth()/2, image.getHeight()/2);
            g2.drawRenderedImage(image, at);
        private BufferedImage convert(Image src) {
            int w = src.getWidth(this);
            int h = src.getHeight(this);
            int type = BufferedImage.TYPE_INT_RGB; // options
            BufferedImage dest = new BufferedImage(w,h,type);
            Graphics2D g2 = dest.createGraphics();
            g2.drawImage(src,0,0,this);
            g2.dispose();
            return dest;
        private MouseListener ml = new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                rotate();
    }

  • Can you lock aspect ratio, define border and image size with automated BatchCropStraighten?

    Hello everybody,
    I need to crop and straighten a load of scanned rectangular stamps that will start as a single scanned image, and I want to lock the aspect ratio to 1:1, define the top border size (such that the the borders on the sides will be bigger than those top and bottom) and specify the output image size.
    Does anybody know if this is possible using the automates BatchCropStraighten function?
    Thanks,
    Paul

    paulsinyard wrote:
    Does anybody know if this is possible using the automates BatchCropStraighten function?
    I know of no BatchCropStraighten feature in Photoshop.  Photoshop has a Plugin CropPhotosAuto that you access through menu File>Automate>Crop and Straighten Photos.
    On my windows system its "C:\Program Files\Adobe\Adobe Photoshop CC 2014\Required\Plug-Ins\Automate\CropPhotosAuto.8li". This plug-in is designed to help you scan several image with a single scan. All the plug-in does is to look at the current active document looking for what appears to be a scanned image and to create an additional document that contain a straighten version of the image the size of the image. No files are created nothing is saved only one document is processed even if you had several scans open in Photoshop.  When the Plug-in ends the current active document is the last document the plugin created.
    You may be able to program a Photoshop script that would fit the create documents to some size then add canvas that would make all the documents have the same Aspect ratio and size. The borders added would be equally sizes on opposite sides top and bottom the same left and right the same.  However the image aspect ration inside the borders may vary.
    I created a fake scan with five simulated images. Not straight and not all rectangles  and duped the document so two would be open the used File>Automate>Crop and Straighten Photos when the process finished I spread out the document so you could see all that are open in this screen capture.

  • Image size with adf:render  model="bindings.Image" /

    Hi all. Please help.
    i don't how to make image size when i use <adf:render model="bindings.Image" />. In database Image column type is ORDSYS.ORDIMAGE.
    And when I upload image i use <adf:inputrender model="bindings.Image"/> it's work ok, but i don't how to hide the text "Upload file" next to the browse file input.
    Please help.
    THanks you very much.

    Repost, Urgent, please help

  • Maximum Image size for 21mp Canon Camera

    HI, I need advice and help please.  Can anyone tell me how big I can get
    my 21mp photos to go. I have a Canon 5D Mark II and am using a 16-35mm
    Pano lens. I also need to know how to work with these photos to get them to maximum size. I haver Cs3, Any help is really appreciated, Zita

    Some folks use a specialty upsampling tool called Genuine Fractals that helps fool the eye into thinking there's more detail in the image than the camera captured.  It tends to preserve the crispness of edges in the image.  It's a pretty slick tool, but it's not for every image.
    As an example, using Genuine Fractals I made a beautiful 24 x 30" print of a little church in Colorado I photographed with a 3 MP Canon EOS-D30 back in 2000 that looks darn nice even close up.
    -Noel

  • Reduced DVD image size with HD to SD footage in Encore

    Using CS5, when I encode an SD sequence from Premiere to Encore, all works well.  When I downconvert an HD project through AME it looks fine and shows full screen in Encore, but when I burn a DVD and play it, I get a reduced size image in the center of the screen.
    I'm shooting 1080 24p with a Panasonic HPX170 camcorder.  I create Microsoft AVI files using On Location.
    I use a Matrox MXO2 Mini with Max display unit, so I'm using  these Premiere project settings: 
    Matrox HD
    1990x1080
    [email protected]
    I'm exporting the Premiere timeline using the recommended settings in the Jeff Bellune CS4 tutorial for converting Premiere HD footage to SD for DVD burning
    FORMAT: MPEG2-DVD
    PRESET NTSC 23.976p Widescreen High Quality
    VBR 2 PASS
    Maximum Render Quality
    Min bit rate 2.8 
    Target bit rate 7
    Max bit rate 8
    GOP SETTINGS  M frames 3  N frames12
    Audio 48 kh PCM 16 bits
    Multiplexer NONE
    When I render files and build a project with Encore, the timeline and menu image appears full screen in the Encore monitor.
    When I burn the project to DVD, it displays properly in letterbox on a standard def tv.
    But, when I play the DVD on an HDTV, I get a great looking picture in proper aspect ratio, but it displays at about 3/4 size in the center of the screen with black surrounding it.  I can change the display setting on the HDTV to 'Zoom" and fill the screen with the picture without distortion.
    I have the same issue creating footage at 1080i 60 fps and 1080p 30 fps and building projects with appropriate settings in Premiere and Encore.
    I'm wondering if I'm missing a setting in AME or Encore. I thought I'd followed Jeff Bellune's excellent instructions on HD to SD settings in AME to the letter.
    I'd like to create DVDs that will play full screen on HDTVs and in letterbox on standard def TVs without viewers having to change the settings on their HDTVs.
    FYI, I'm shooting in HD, partially to get really clean keys during the edit, using the Ultra keyer in Premiere. This works great.
    Thanks for any assistance.

    Jeff,
    I went back and checked all the PAR settings and looked at the monitors in 100% mode.  Didn’t solve the problem, but here’s what I found.
    I’m using an avi film clip shot at 1080 24p on the Panasonic HPX170P.
    In CS5 Premiere, I checked the interpret footage setting on the clip.
    It read: Pixel Aspect Ratio: DVCPROHD(1.5)
    I right clicked the timeline to see its properties and saw: PAR 1.5.
    When I checked the monitor at 100% it zoomed in to a close-up of the middle of the image, compared to a full-screen image in “fit.”
    In AME, I used the settings from your Scaling HD to SD using CS4 tutorial and the 1080 24p option.
    When I changed the monitor view to 100% and switched back and forth between SOURCE and OUTPUT views, the SOURCE view was tightly zoomed into the center of the frame, and the OUTPUT view was slightly zoomed in, only losing a bit of the sides of the frame.  Unchecking "Aspect Ratio Correction" squeezed both source and output monitor images horizontally. I rechecked "Aspect Ratio Correction."
    I imported the encoded clip into Encore and checked its PAR.
    The PAR was set to “SQUARE 1.0”
    The 100% view in the monitor was just slightly zoomed in from the “fit” view.
    I tried changing the PAR on the clip in the project window to “Conform to:SD NTSC WIDESCREEN 1.2121.”
    This did not change the 100% monitor view.
    I saved the project and burned a DVD, but saw no change in the menu or clip size. Still small image centered.
    Next I changed the PAR on the clip in the Encore project window to: “Conform to Anamorphic 1.333.”
    This shrank the 100% view to show a letterbox view of the clip, showing the entire clip image.
    I saved the project and burned a DVD.  On the DVD, the menu appeared unchanged, still small and centered. The clip played in full 4:3 aspect ratio, not distorted, with the edges side cropped.
    Any other PAR settings I missed I should access and change?
    Any additional things for me to try?

  • Reducing image size with Preview?

    I notice that Preview's "adjust size" option can considerably reduce the size of some images i got from internet. For instance, with a 366 KB JPEG image, after clicking on adjust size, there would be a line at the bottom of the window that says: 101 KB (was 366 KB). And i know this new smaller sized image has the same quality as the original because when i compare both images at maximum zoom, i see no difference in the size, color or position of the pixels. So, does anyone know how this size reduction method can be applied simultaneously to many images or to an entire folder? Or do you know any software (preferably free) that does something similar without quality loss?
    Thanks in advance

    Then change the subsampling rate or turn it off in the PDF Optimizer.  But realize that in doing so you trade the quality for a larger size.

  • How can I descreen and scale the target image size with a HP 8600 n911 premium?

    I recently purchased an new HP 8600 n911 premium all-in-one, HP's top of the line all in one inkjet printer/scanner.  I cannot find any settings that permit me to descreen an image (such as one in a newspaper) or to adjust the size of the target image.  Is there additional software that will permit me to do this or am I missing something in the software provided by HP?  
    This question was solved.
    View Solution.

    You would need software form a third party to have this option.  The free software that comes with the 8600 doesn't have an option for that. Vuescan is the only software I could find that says it works with your pritner and has a descreen option.  You have to purchase it, but it will give you more advanced options than the software that came with the printer.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Most efficient way to handle Image sizes with respect to Mobile Screen Size

    Hi all,
    I and trying to find the best possible way to manage Images with respect to the size of mobile screen.
    If I have an image that is best fit on mobile screen size (176 x 144) then how can I make it best fit for (128 x 128) screen size ?
    rizzz86

    Hey Rizzz86,
    You could also scale down a higher resolution image to fit smaller screens, however you will find that resizing by factors other than 2, 4, 8 is harder to achieve with a decent quality and much slower on lower spec devices.
    You could also display 128x128 image centered on 176 x 144 screen with black borders around it.
    It will look not that bad (i.e. borders of 24 pixels top and bottom and 8 pixels left and right) and will cost you nothing in terms of space or processing.
    In the end having an image in 3 different sizes will not increase the MIDlet size by much, unless you are having tens of such images (for example custom UI elements).
    Best solution is to have a bit of both I think. Personally I use scaling down by factors that are powers of 2 and displaying with the black borders.
    Daniel

  • Image to array maximum image size

    Hey guys,
    I have a problem with the Image to array VI. I am getting the image from a FL2-20S4M camera from point grey, which has a maximum resolution of 1624x1224 pixels. The image is loaded with IMAQ vision and displayed. I now use image to array to convert the image and display it in an intensity graph. When I set the resolution of IMAQ vision to 800x600 it worked. When I set it to 1624x1224 the image was still displayed, but the intensity graph was empty. Now I set the resolution back to 800x600, but the intensity graph does not work again.
    Is this a known problem or is there a maximum resolution for image to array? How could I fix the problem or at least make it work with 800x600 again?
    Thanks a lot in advance,
    Stefan

    Is the camera a 16bit one?If yes then can you convert it to 8 bits and try?

  • Impossible to modify Image size with Directshow

    Hi!
      i'm using an IDS ueye USB camera with directshow.
    With its own software and other Dierctshow softwares, i'm able to modify the size of the image and the frame rate of the camera.
    Unfortunatelly, with MAX is impossible to change the size of the image.
    I can only choose between few video mode by a ring control, such as "1024x768 RGB32 15.00fps","1024x768 RGB24 15.00fps,"1024x768 RGB8 15.00fps". No way to select a custom format.
    With other directshow softwares i can change the FPS, Width and Heught parameters without any problems.
    As you can see in the attached image, the value of the size are disabled.
    I attach even the AMCap .ini files.
    Can anyone help me?Is it a bug of Max?
    Attachments:
    ueye_MAX_NI.zip ‏254 KB

    grepponline,
    This is a limitation of DirectShow. The subset of defined interfaces for controlling the camera is fixed and limited and does not include facilities for things such as changing the width and height directly, only via the list of video modes the driver exposes.
    What you are seeing is that DirectShow provides facilities that a driver can provide a UI panel that can be opened to control things in their driver directly. It seems that IDS's driver has a custom panel for controlling those things you showed in your screenshot.
    Now, in IMAQdx we made a conscious decision not to rely on the camera-vendor-specific UI popup. There are many reasons for this, but the main reason is that IMAQdx cannot interact programatically with those panels. One would have to call some function in IMAQdx and then a random window would have to pop up that the user would have to interact with. We would also have no way to store these settings in our camera file like all the other camera settings, since DirectShow leaves it vendor-defined how the driver is expected to store any changes you make in their UI. 
    As you mentioned, it makes sense for customers writing software using IMAQdx to be able to write software once and use it with any camera IMAQdx supports. Any saved settings in MAX are applied when you open the camera. If we relied upon the vendor-specific UI panels we could not give this behavior.
    I would suggest you encourage IDS to provide more options in their standardized supported video modes DirectShow interface if you are not finding a mode that matches what you want. The other option would be to move to a camera technology that is more flexible with regards to configuring the camera in a generic way, such as firewire or GiGE Vision.
    Eric 

  • Maximum file size with Adobe Media Encoder?

    I seem to be having a problem when converting files in AME.
    I'm converting .m2v files into quicktimes files, using the DVCPRO HD 1080i50 codec. No sound is being exported with the audio.
    Dimensions are 1440 x 1080, frame rate, field type and aspect are locked at 25, Upper First and HD Anamorphic 1080 (1.333) respectivly.
    I've encoded about eleven other files of the same type without fail, however this certain file is at 1.7gig compared, where as every other file I wanted to encode is under 1gig.
    I'm using an Asus N53SV with 16gig of ram, so I'm sure my laptop can handle whatever is thrown at it. I'm using a 64bit operating system on Windows 7 home premium Service pack one.
    Processor: Intel Core i7 - 2630QM CPU @ 2.00Ghz
    RAM Memory: 16gig
    Graphics card: Nvidia Geforce FT 540M
    Progam: Adobe Media Encoder CS5.5 ver. 5.5.1.12
    The error log reads:
    - Source File: G:\Digital Postcard\To convert\Untitled-6.m2v
    - Output File: G:\Digital Postcard\To convert\Untitled-6_2.mov
    - Preset Used: Custom
    - Video: 1440x1080, 25 fps, Upper, Quality 100
    - Audio:
    - Bitrate: DVCPRO HD 1080i50
    - Encoding Time: 00:09:50
    04/19/2012 03:19:30 AM : Encoding Failed
    File size that I want to encode is 1.7gig
    I'm assuming either the file is corrupt or I don't have sufficient specs to handle the large file.
    Any help will be great,
    Thanks.

    There are no file size limits to the software beyond what would be imposed by the operating system itself and the file format of the drive.
    So...assuming you have enough drive space, something else is going on.

  • Image size with SL1

    Hello,
    We just got an SL1 and it seems like the images are much wider than they are high, so wide that they look funny. When you take a vertical picture, the image looks very tall and skinny when viewed on the computer. We have it set to the 18mp high quality setting and the pixels match what the camera says, but it doesn't look right on any screen. 
    When I resize regular landscape images for my blog to 2000px wide, the height is only 1333px.
    Typically when I resize them (on my old point and shoot) they would be 2000px x 1500px. 167 pixels is a lot once you get down to uploading lanscape images to places like pinterest.
    This narrow appearance also makes pictures look funny when uploaded anywhere to the web, like facebook or craigslist. 
    Any help/insight would be greatly appreciated. 
    See image below, extra tall and skinny....
    Thanks!
    Ace

    Also note that according to you your old camera was shooting in the 4:3 ratio (2000 X 1500)
    "A skill is developed through constant practice with a passion to improve, not bought."

  • Java Imaging API for Displaying CGM IMAGES along with Hotspot on Applets

    Are there any java imaging API's which displays the CGM Images on Applets? The CGM Image has Hotspot keys built in. So the Image displayed through Applet should also display the Hotspot keys.
    Also any Event Handler API's when the hotspot key is clicked?
    It would be great, if anyone can send any link regarding this subject

    You may want to try the jcgm library, though it doesn't support hotspots yet.
    [http://jcgm.sourceforge.net/]
    Philippe

  • Correlating image size with DIV size

    Dreamweaver gives me the option called Draw AP DIV.
    (I am guessing this means to define the boundaries of an absolutely positioned Div)
    When inserting an image into a DIV that is created in this manner, is there a way to constrain the size of the image
    to equal the boundaries of the drawn DIV?

    Repost, Urgent, please help

Maybe you are looking for