else if (ratio > 1) sizeY *= ratio;
else if (ratio > 1 && ratio != 0) sizeY *= 1/ratio;
    private void loadThumbail(int index)         throws ImageServerException    {        PixelsDescription pxd = images[index].getDefaultPixels();        int sizeX = maxWidth, sizeY = maxHeight;        double ratio = (double) pxd.getSizeX()/pxd.getSizeY();        if (ratio < 1) sizeX *= ratio;        else if (ratio > 1) sizeY *= ratio;        BufferedImage thumbPix = context.getPixelsService().getThumbnail(                                                pxd.getPixels(), sizeX, sizeY);        currentThumbnail = new ThumbnailData(images[index].getID(), thumbPix);    }