Image Slicer ..

Hey there,
I have been writing this program to slice an image into smaller parts. Quite simple, you give it an image, an array of rows and an array of columns and it gives you the image sliced up. (code follows)
All is well and good when I provide it with a PNG but with other formats i'm getting some strange results.
n.b this isnt too urgent as i shall probably only be wanting to slice PNG files; but it would be nice to know i could do others if i should want to, and anyway, i would really like to know why it shouldnt work.
Attempting it with a GIF appears to work, but when I try to view the new files I am told they cannot be shown as they contain errors.
JPGs give me a run time error, as the ImageTypeSpecifier returned by the call to ImageReader.getRawImageType(0) is null.
Anyway, heres the code,
import java.awt.*;
import java.awt.image.*;
import javax.imageio.*;
import javax.imageio.stream.*;
import java.io.*;
public class ImageSlicer {
     public static void main(String args[]) throws IOException {
          ImageSlicer is = new ImageSlicer("unchopped.png");
          int[] r = {20,50};
          int[] c = {40,250};
          is.setRows(r); is.setCols(c);
          is.slice();
     public ImageSlicer(String image_file) {
          img_f = image_file;
          img = Toolkit.getDefaultToolkit().createImage(img_f);
          mt = new MediaTracker(new Container());
          mt.addImage(img,0);
          try {
              mt.waitForID(0);
          } catch(InterruptedException e){}
     private String img_f;
     private Image img;
     private int[] rows, cols;
     private MediaTracker mt;
     public void setRows(int[] row_cut) {
          rows = new int[row_cut.length+1];
          int i;
          for(i=0;i<row_cut.length;i++)
               rows[i] = row_cut;
          rows[i] = img.getHeight(null);
     public void setCols(int[] col_cut) {
          cols = new int[col_cut.length+1];
          int i;
          for(i=0;i<col_cut.length;i++)
               cols[i] = col_cut[i];
          cols[i] = img.getWidth(null);
     public void slice() throws IOException {
          long strt = System.currentTimeMillis();
          if(rows==null) {
               rows = new int[1];     rows[0] = img.getHeight(null);
          if(cols==null) {
               cols = new int[1];     cols[0] = img.getWidth(null);
          ImageInputStream iis = ImageIO.createImageInputStream( new File(img_f) );
          ImageReader ir = (ImageReader)ImageIO.getImageReaders(iis).next();
          ir.setInput(iis);
          int i,j,x,y,w,h; BufferedImage b;
          for(i=0;i<rows.length;i++)
               for(j=0;j<cols.length;j++) {
                    if(i==0)
                         y = 0;
                    else
                         y = rows[i-1];
                    if(j==0)
                         x = 0;
                    else
                         x = cols[j-1];
                    w = cols[j] - x;
                    h = rows[i] - y;
                    b = makeSlice(x,y,w,h,ir.getRawImageType(0));
                    String f = img_f.substring(0,img_f.lastIndexOf(".")) + "_" + i + "_" + j + "." + ir.getFormatName();
                    ImageIO.write(b,ir.getFormatName(),new File(f));
          long time = System.currentTimeMillis()-strt;
          System.err.println("image sliced in " + time + "ms.");
     public BufferedImage makeSlice(int x, int y, int w, int h, ImageTypeSpecifier its) {
          BufferedImage bi = its.createBufferedImage(w,h);
          Image i = Toolkit.getDefaultToolkit().createImage(
                    new FilteredImageSource(img.getSource(),new CropImageFilter(x,y,w,h)) );
          mt.addImage(i,1);
          try {
          mt.waitForID(1);
          } catch(InterruptedException e){}
          Graphics g = bi.createGraphics();
          g.drawImage(i,0,0,null);
          g.dispose();
          return bi;

I love a nice challenge to get the brain thinking. This one was fun.
Heres what I came up with (not really sure what exactly you were trying to do with your rows and columns....)
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.awt.image.Raster;
import java.io.File;
import javax.imageio.ImageIO;
* @author Ian Schneider
public class ImageSlicer {
    public static final void main(String[] args) throws Exception {
        String srcFile = args[0];
        String[] names = args[0].split("\\.");
        int w = Integer.parseInt(args[1]);
        int h = Integer.parseInt(args[2]);
        BufferedImage img = ImageIO.read(new File(srcFile));
        slice(img,w,h,names[0],names[1]);
    static void slice(BufferedImage img,int w,int h,String name,String ext) throws Exception {
        BufferedImage piece = new BufferedImage(w,h,img.getType());
        int iw = img.getWidth();
        int ih = img.getHeight();
        Rectangle srcRect = new Rectangle(w,h);
        int idx = 0;
        for (int x = 0; x < iw; x+=w) {
            for (int y = 0; y < ih; y+=h) {
                srcRect.setLocation(x,y);
                Raster rect = img.getData(srcRect);
                piece.getRaster().setRect(-x,-y,rect);
                File f = new File(name + "_" + idx++ + "." + ext);
                System.out.println("writing " + f);
                ImageIO.write(piece,ext,f);
}Couple of things to note here:
1) reusing the BufferedImage destination piece. This will make things much more efficient for a large image.
2) creating the BufferedImage using the same type as the source image (no more messed up output)
3) using Raster to copy the data - makes things easier. Note the -x,-y translation in the setRect method. This is because the getData method returns a Raster "view" not a copy of the data. The x and y locations are therefore the same and must be translated back to 0,0 for the copy.
4) the input arguments are file and desired size of resulting pieces (width X height)
There are obviously lots of improvements to make here, I tried to focus on just the image processing portion.
Have fun

Similar Messages

  • Create a transparent swap image slice over an html slice

    I have a 990px x 400px page divided into two halves horizontally.
    The left slice is a html slice that consists of an unordered list with hrefs to various pages.
    The right slice is an image that I want to put some polygon hotspots with each having a swap image behavior to swap an image over the html slice and I am unsure how to put a transparent image slice over a html slice.
    Sure could use some help.
    Terry 

    You can't overlap slices in Fireworks, as Fireworks needs to have a clearly defined, single image to export. Overlapping slices or hotspots makes that impossible. This means that, for one thing, you can't put polygon hotspots over your left slice.

  • Multiple image slices

    Given a file having mulitple image slices, I need to display a few in the first page. When the user scrolls down the panel, the rest should be shown in the second page. I dont know how this can be done in Java. Please help.

    I'm using an applet with a single image. I want to do that with multiple images.....can i use what u specified in my applet? if so can u givbe me some guidelines as to how to approach?

  • How to create image slice with transparent background without white halo around?

    Hi, I want to make slice image with transparent background. I set the slice option background color to my background color. But when the image is on my html page set against the same background color, it has white halo around:
    How can I get rid of the white halo?
    I need the slice image to have transparent background and not have a color background because it's going on a rollover button with the background change. I don't want it to look like this on rollover:

    >it looks to me like you built it with that "halo" to start with.
    No, I didn't put in the halo myself. The shape is a character from the Webdings font. It's set to some darker fill color and set on a transparent background. Photoshop put the white halo there after "Save For Web".
    > Make your graphic on a transparent background and Save for Web
    I did exactly that, see:
    I set the slice background to my color. I try the Matte option and come out the same with white halo.
    It seems I'm not making Photoshop antialias to my background color, instead Photoshop just antialias to white.
    What else do I need to do?

  • Vertical repeating background slice from image

    Hi. I'm trying to slice a portion of a Photoshop CS4 image and use it as a vertical repeating background at the top of a web page. Then I'm overlaying the full image in the horizontal center of the web page. No matter how much I try, the background slice image comes out a little washed out compared to the full image -- with a slight border to each slice.
    What am I doing wrong? I've tried saving the image slice as GIF, JPG, and PNG, but they all produce the same result. Thanks.

    I had the slice set to 2px wide. Once I zoomed in very close, I could see that the right pixel was lighter than the left one all the way down the slice. I had feather set to 0 and it still did this. I sliced it down to 1px and that fixed it.

  • Tiling or slicing large images in tables? Completely outdated?

    I'm working through the XHTML tutorials on Lynda.com
    The instructor does a demo of slicing a large image with sections that have animated .gifs. He slices the static portions and slices the animated portions and then combines them in a 3 slice x 3 slice table.
    He says "I still prefer to do this with tables, since it's what it was designed for."
    I know tables are outdated, but I'm not sure if it's in all respects. Like if I was going to do a data table, I certainly would use tables...
    Im not sure when this video was made, but is it still in practice and a good practice?
    He then shows a similar demo of how to combine slices using CSS. Is this outdated too? Are people still slicing large images?

    Unlike print design where everything is static and unchanging, web pages need to be flexible and web accessible to accommodate all users, displays and devices.
    Image slices have their plusses and minuses.  Occasionally, you may need them to create a flexible container that resizes to content.
         3 image slices in a CSS layout ~
         http://alt-web.com/DEMOS/Image-slices-in-a-CSS-based-layout.shtml
    That said, you can add visual interest to web pages without a lot of images using CSS.
         2-image web page design ~
         http://alt-web.com/TEMPLATES/2-image-web-design.shtml
    Finally, have a look at CSS Zen Garden where the power of CSS is demonstrated.
    Each page contains identical HTML markup but with wildly different styles.
    Hopefully this will inspire you to move away from tables and use CSS for primary layouts.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How can I update my image in a loop?

    I want to use "paint( )" automaticlly to display my 3D image slice by slice. I can't understand why it only display my final slice. Below is my coeds:
    // press butten to display my 3D image slice by slice
    if(e.getActionCommand() == "Play")
         for(int i = 0; i < finalSlice; i++)
              if(presentSlice == finalSlice)
                   presentSlice = 0;
              presentSlice = presentSlice + 1;
              // read a new slice from a 3D data. Return
              // matrix is a new 2D image data
              pixel = mccd.readSlice(presentSlice, mapModel);
              //Gererate a new slice image
              img = createImage(new MemoryImageSource(width, height, pixel, 0, width));
              //input the image onto my image panel;
              imgPanel.imageUpdate(img);
              } // Here can not work. Only can               // work in the last time of loop.
    public class ImagePanel extends JPanel
         public void imageUpdate(Image image)
              this.image = image;
              repaint();
         public void paintComponent(Graphics g)
              super.paintComponent(g); //paint background
              //Draw image at its natural size first.
              g.drawImage(image, 0, 0, this);
    Thanks a lot for any help. Could you email me on
    [email protected] Thanks again

    You can try the following:
    Create a new object that extends runnable. Have a variable that keeps track of the current slice. In its paint() method, paint the current slice.
    Now, in its run() method start from the first slice and get into a loop that calls Thread.sleep(1000) and then makes the current slice = to the next slice. you can replace 1000 with whatever duration you want.
    My recommendation is that this object should extend a container. After that, you just add the component into a window and display it.
    Hope this helps,
    Calin
    PS: I did this and it worked for me. If you need it I will try to give you some code you can start from.

  • Linked images in a table showing visted and messing with the the whole table

    Help Please.
    I have never had this happen in any other version of dreamweaver.  Using dreamweaver CC right now.
    I have an image created in photoshop. cut into slices. load the html and images into dreamweaver.  Dreamweaver then creates a table.  If i upload just like that, site looks fine.  Once I choose an image slice, create a link to it and then upload the site, there is a purple border around the image therefore wrecking my whole table.  The site shows breaks between each image slice.
    THank you

    The only real advice I can give, that will help you in the long run, would be to take some time to learn at least the basics of html and css. Photoshop's way of doing things will almost always blow your site to pieces as soon as you start changing content around. To create professional websites with DW, you are expected to understand HTML and CSS (and to a lesser degree, javascript). Without a firm understanding of HTML and CSS though, little issues like the IE border problem can become huge problems.
    There are tons of places online to get tutorials on all of this, I personally like the following links, for the basics...
    HTML: http://w3schools.com/html
    CSS: http://w3schools.com/css
    Once you understand what's going on behind the scenes in DW, it's much easier to work with the program. Once you understand how to work with the code the program gives you, Photoshop can be left to do the work it was designed for, image manipulation.

  • Use different "fx-border-image-source" for first tab and remaining tabs

    Hi,
    I'm using something like this
    .tab {
    -fx-padding: 0px 5px -2px 5px;
    -fx-background-insets: 0 -20 0 0;
    -fx-background-color: transparent;
    -fx-text-fill: #c4d8de;
    -fx-border-image-source: url("images/tab5.png");
    -fx-border-image-slice: 20 20 20 20 fill;
    -fx-border-image-width: 20 20 20 20;
    -fx-border-image-repeat: stretch;
    -fx-font-size: 22px;
    .tab:selected {
    -fx-border-image-source: url("images/tab-selected5.png");
    -fx-text-fill: #333333;
         -fx-background-color: red;*/
    to customize the tab appearance of a TabPane.
    That worked well. But I need to use a different set of images for just the first tab. Does anyone know a way to accomplish that?
    Thanks.

    How can I "fix up" the first tab of tab panes that are created after I "fixed up" the first tab of the initial tab pane?
    My app allows user to create new tab panes at any moment during program execution.Not easy to answer this one.
    The best answer would be to use structural pseudoclasses, but (as David points out), they are not yet implemented.
    The trick here is how to identify the first tab of each tab pane so that it can be styled separately from the other panes.
    Doing the styling without a dynamic lookup is preferrable to using a dynamic lookup (i.e. when the first tab is created give it a specific style, e.g. tab0).
    This is how the charts work, where they set style classes based on series of data, e.g. series0, series1 - this allows you to independently style each series of data.
    However the chart stuff has all of that built into the implementation, whereas the tabs don't. To achieve that you would likely need to go into the TabSkin code (http://openjdk.java.net/projects/openjfx/) find out where and how it generates the Tab nodes and write a custom tab skin or extension of the existing one which assigns a numeric style class to each new tab in a pane (e.g tab0, tab1, etc). In other words, not particularly easy if you are unfamilar with the tab skin implementation. You could log a javafx jira feature request to have those style classes set on tabs - file it here => http://javafx-jira.kenai.com.
    In the meantime a simple alternative is to use the dynamic lookup method in my previous post and a hack such that whenever you add a new tab pane to the scene you do something like the following:
    new Timeline(
      new KeyFrame(
        Duration.millis(50),
        new EventHandler<ActionEvent>() {
          @Override public void handle(ActionEvent arg0) {
            Node tab = newTabPane.lookup(".tab");
            if (tab != null) tab.getStyleClass().add("first-tab");
    ).play();The reason for the Timeline is that I don't really know at what stage the css layout pass is executed. I know that when you initially show the stage and then do a lookup, the css pass seems to have already been done and the lookup will work. But for something that is dynamically added or modified after the scene is displayed - I have no idea when the css layout pass occurs, other than it's some time in the future and not at the time that you add the tabPane to the scene. So, the Timeline introduces a short delay to (hopefully) give the css layout pass time to execute and allow the lookup to work (not return null). Not the best or most efficient solution, but should work for you.

  • How to load images from css file in JavaFX 8

    I have this css file which loads images in JavaFX 8 application:
    #pill-left {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/left-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-left:selected { -fx-border-image-source: url("/com/dx57dc/images/left-btn-selected.png"); }
    #pill-left .label {
        -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-left:selected .label {
        /* -fx-text-fill: black; */
        -fx-text-fill: white;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-center {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/center-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-center:selected { -fx-border-image-source: url("/com/dx57dc/images/center-btn-selected.png"); }
    #pill-center .label {
        -fx-text-fill: #d3d3d3;
         -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-center:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-right {
        -fx-padding: 5;
        -fx-border-image-source: url("/com/dx57dc/images/right-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
         -fx-border-image-repeat: stretch;
        -fx-background-color: null !important;
    #pill-right:selected { -fx-border-image-source: url("/com/dx57dc/images/right-btn-selected.png"); }
    #pill-right .label {
         -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-right:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    The images are located at the Java package com.dx57dc.images
    In Java 7_25 this code works as expected but in JavaFX 8 b99 I get this error:
    ava.lang.NullPointerException
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1129)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
    at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:210)
    at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
    at java.lang.Thread.run(Thread.java:724)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    What is the proper way to load images from css in Java 8?
    Ref
    How to load images from css file in JavaFX 8 - Stack Overflow

    There is nothing special to do - you execute the statement from your program just like any other SQL statement.  The only thing to be aware of are the privilege/permission issues:
    When loading from a file on a client computer:
    READ CLIENT FILE privilege is also required for the database user.
    Read privileges are required on the directory being read from.
    The allow_read_client_file database option must be enabled.
    The read_client_file secure feature must be enabled.
    Revoking these privileges is also the only way you can prevent a user from executing the statement.

  • Swap images works in preview but not in browser

    Hi everyone,
    I am attempting to get a swap images to work.  It works in the preview window but not when I preview it in the browser.  When I open it in a browser the states seem to "cycle" through really quickly in rapid succession.  I have linked my png file for you to see.  Any thoughts?
    Thanks,
    denbeck

    Your swap image slice is set to Animated GIF. Change it in the Optimize panel to plain GIF or PNG 8
    Jim Babbage

  • White lines showing around some of my slices (in internet explorer)

    Hi,
    This is my first time posting, it's an awesome forum. I've put the site up at the url below. It renders fine on my mac in firefox and safari, but on pc in explorer, it is showing white lines around some of my slices. I don't know what is the best way to correct this problem? I'm using dreamweaver CS3. (normally work in print design) I've done the slices in image ready CS2.
    http://www.bulls-eyegraphics.com/
    thanks,

    Hi and Welcome to the DW forum.
    I'm using dreamweaver CS3. (normally work in print design) I've done the slices in image ready CS2.
    I'm afraid most everything you know about print design goes out the window in Web Design.  Print and graphic design is rigid and static.  Web design needs to remain  flexible to accommodate varying amounts of text, increased text sizes, various browser and user settings.
    When I increase text size in my browser, your page content becomes unreadable.  This is typical of Image Ready generated code which is far too fragile for use on a real web site.  Image Ready code is really only good for creating a quick design  comp to show the client.  Use Photoshop for graphics and slicing images. Use DW to build your HTML and CSS code.
    Basic - 3-Image Slices into a CSS based Layout:
    http://alt-web.com/DEMOS/Image-slices-in-a-CSS-based-layout.shtml
    Advanced - Taking  a Fireworks (or Photoshop) comp to a CSS based layout in DW
    http://www.adobe.com/devnet/fireworks/articles/web_standards_layouts_pt1.html
    Very Nice looking design BTW.  Good luck with your project,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • How to process Large Image Files (JP2 220MB+)?

    All,
    I'm relatively new to Java Advanced Imaging, so I need a little help. I've been working on a thesis that involves converting digital terrain data into X3D scenes for future use in military training and applications. Part of this work involves processing large imagery data to texture the previously mentioned terrain data. I have an image slicer that can handle rather large files (200MB+ jpeg files). But it can't seem to process jpeg 2000 data. Below is an excerpt from my code.
    public void testSlicer(){
    String fname = "file.jp2";
    Iterator readers = ImageIO.getImageReadersByFormatName("jpeg2000");
    ImageReader imageReader = (ImageReader) readers.next();
    try {
    ImageInputStream imageInputStream = ImageIO.createImageInputStream(new File(fname));
    imageReader.setInput(imageInputStream, true);
    } catch (IOException ex) {
    System.out.println("Error: " + ex);
    ImageReadParam imageReadParam = imageReader.getDefaultReadParam();
    BufferedImage destBImage = new BufferedImage(256, 256, BufferedImage.TYPE_INT_RGB);
    Rectangle rect = new Rectangle(0, 0, 1000, 1000);
    //Only reading a portion of the file
    imageReadParam.setSourceRegion(rect);
    //Used to subsampling every 4th pixel
    imageReadParam.setSourceSubsampling(4, 4, 0, 0);
    try {
    destBImage = imageReader.read(0, imageReadParam);
    } catch (IOException ex) {
    System.out.println("IO Exception: " + ex);
    The images I am trying to read are in excess of 30000 pixels by 30000 pixels (15m resolution at 5 degrees latitude and 6 degrees longitude). I continually get an OutOfMemoryError, though I am pumping up the heap size to 16000MB when using the command line.
    Any help would be greatly appreciated.

    Hi,
    In general, an extra sizing for XI memory consumption is not required. The total memory of the SAP Web Application Server should be sufficient except in the case of large messages (>1MB).
    To determine the memory consumption for processing large messages, you can use the following rules of thumb:
    Allocate 3 MB per process (for example, the number of parallel messages per second may be an indicator)
    Allocate 4 kB per 1kB of message size in the asynchronous case or 9 kB per 1kB message size in the synchronous case
    Example: asynchronous concurrent processing of 10 messages with a size of 1MB requires 70 MB of memory
    (3MB + 4 * 1MB) * 10 = 70 MB With mapping or content-based routing where an internal representation of the message payload may be necessary, the memory requirements can be much higher (possibly exceeding 20 kBytes per 1kByte
    message, depending on the type of mapping).
    The size of the largest message thus depends mainly on the size of the available main memory. On a normal 32Bit operating system, there is an upper boundary of approximately 1.5 to 2 GByte per process, limiting the respective largest message size.
    please check these links..
    /community [original link is broken]:///people/michal.krawczyk2/blog/2006/06/08/xi-timeouts-timeouts-timeouts
    Input Flat File Size Determination
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    data packet size  - load from flat file
    How to upload a file of very huge size on to server.
    Please let me know , your problem is solved or not..
    Regards
    Chilla..

  • Background image not scrolling with text

    My foreground text will resize with my browser but the background stays stationery, remains in the upper left. How do I fix this? I have included part of my code.
    Ideally I would like to anchor text boxes to background image so it will scroll all together. If this can't be done I can use the margins and padding to adjust my text to work with the background I just need it to move with it.  I've seen samples of this, which i  think may have been done in photoshop but I would like to keep the copy live in DW. FYI, I added "background-attachment:scroll" to the code. I have searched and searched online for a solution to no avail.  I am attaching a coupld of PDFs so you can see where I want to go. Any help is greatly appreciated. Thanks a bunch in advance and please be gentle.
    body  {
         background: #666666; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
         padding: 0;
         text-align: center;
         background-image: url(Images/Background_Radial77.jpg);
         background-repeat: no-repeat;
         margin-right: 0%;
         margin-top: 19%;
         color: #FFF;
         background-color: #FFF;
         background-attachment:scroll
         margin-left: 0%;
         font-family: Verdana, Arial, Helvetica, sans-serif;
         font-size: 100%;
         margin-bottom: 0;
         margin-left: 0;

    My foreground text will resize with my browser but the background stays stationery, remains in the upper left. How do I fix this?
    That's how web pages work.  Remember, web design is nothing like print design.  Printed pages or graphics are static.   Web pages must be flexible to accommodate  different displays, text sizes and varying amounts of content.   Trying to precisely position text or other objects over a huge background is a bit like  trying to nail Jello to a wall.  No matter how hard you try,  it will never hold up.
    Fixed Background Example -
    http://alt-web.com/DEMOS/fixed-background.shtml
    Scrolling Divisions Example -
    http://alt-web.com/DEMOS/multi-scrollbars.shtml
    Your best option is to slice and dice your background image into usable segements in Photoshop or Fireworks.  Save images only.  Then re-assemble slices  in  DW to create flexible containers.
    Basic Tutorial - Bringing 3 image slices into a CSS layout -
    http://alt-web.com/DEMOS/Image-slices-in-a-CSS-based-layout.shtml
    Advanced Tutorial -
    Taking  a Fireworks (or Photoshop) comp to a CSS based layout in DW
    http://www.adobe.com/devnet/fireworks/articles/web_standards_layouts_pt1.html
    Good luck with your project,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Editing theme images in 3.0.1

    Hi All,
    In 3.0.1 the images for a template are in the database in the /i/themes/opal (or whatever the template name is). I want to edit some of the images(slices) of my copy of a template using Fireworks. How can I accomplish this?
    Keep Smiling,
    Bob R

    Joel,
    It's 3.0.1 on XE. You can use WebDAV to get to the images, download them directly into Fireworks, save them in a directory (after edititng) and drag and drop them back into the db.
    Keep Smiling,
    Bob R

Maybe you are looking for

  • Setting up new HP Laserjet CP1525nw wirelessly with Time Capsule

    Im having issues setting up my new HP Laser printer via wirelessly with Time Capsule. I have tried with the Wireless Client Setup Assistant but cannot get it to work. Any help or suggestions would be appreciated. Thanks

  • Add row based on previous row in table control?

    Dear all, I have a table control with some rows. Every row contains one button. On button click i want to add another row with dirrerent data. I want to add content based on button text or another columns (ex text views text,) based on this text view

  • Search help for field in ABAP Query

    Hi Experts, For a particular field in standard table the search help(F4) is not maintained in the table level, which is used in a ABAP query. Is there any possibilities for user-defined Search help using InfoSet or Query? Please help me in this regar

  • Info from applet back into web page?

    I know that information can be passed to an applet via <param> tags, but can information be passed back to the page from an applet, perhaps to a javascript or php function?

  • MCIZ report  - Fleet management

    Hi Friends, In MCIZ, no data exists is coming for a fleet equipment after entering the fuel and distance in IFCU. the material is posted in the document for the consumption. But for another fleet equipment it is updating correctly in MCIZ. Could you