Hi i was using this as reference h**p://w**.eclipse.org/articles/Article-Image-Viewer/Image_viewer.html, A basic image viewer to create an image viewer, and the class of the example works perfectly. The thing is i am trying to create a vertical index on one of the sides of the interface and the idea is that the index will show and smaller image of the pictures that are on the same folder of the main image i am displaying on my program. So they have to be displayed on a certain size so they would fit on canvas. I tried a lot of things but i finally end up creating a Class called Indice that is a daughter class from Canvas (swt), and it has a paint function, and has an array of images. But this has been proved to be very un-efficient because when i am loading a folder with more tha 20 images it takes for ever to load the index.
Is there a way to load a mini image of a picture instead of the whole image? What would be the correct way of loading this images.

This is my paint function.
Java Code:
private void paint(GC gc) {
		Rectangle clientRect = getClientArea(); /* Canvas' painting area */
		if (sourceImage != null){
			int alto=0; /* Y point for sourceImage[i] to s*/
			int espacio=10; /* Gap or space between images*/
			
			for(int i=0;i<sourceImage.length;i++){
				if (sourceImage[i] != null) {
					if(i>0)
						alto+=espacio;
					
					Rectangle imageBound = sourceImage[i].getBounds();
					
					// Ratio of the Image real width with the Canvas width
					double prop = (double)imageBound.width/clientRect.width;
                                        //The height of the image displayed.
					int altoImg = (int)((double)imageBound.height/prop);
					
					//gc.drawImage(sourceImage[i], 0, alto);
					gc.drawImage(	sourceImage[i], 
									0,
									0,
									imageBound.width,
									imageBound.height,
									0,
									alto,
									clientRect.width,
									altoImg
									);
					alto+=altoImg;
				}
			}	
		} else {
			gc.setClipping(clientRect);
			gc.fillRectangle(clientRect);
			initScrollBars();
		}
	}
Kind of like an image preview