[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Saving TIFF images

I'm sure this is a really bad idea, but I just changed the scanlinePad to 1 after getting the image data and then wrote that to a file and it worked fine.

ImageLoader imageLoader = new ImageLoader();
ImageData d = model.getImageData();
d.scanlinePad = 1;
imageLoader.data = new ImageData[] {d};
imageLoader.save(ei.path.toOSString(), SWT.IMAGE_TIFF);

I don't really understand what the scanlinePad is used for. Can anyone fill me in? The documentation I found doesn't say much, and there is no indication in the TiffDirectory class as to why it should be 1 in order to save properly.