Skip to content

Commit

Permalink
Update PictReader to remove legacyQT support
Browse files Browse the repository at this point in the history
  • Loading branch information
dgault committed Jul 18, 2023
1 parent 933941e commit dd3f71b
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions components/formats-bsd/src/loci/formats/in/PictReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import loci.formats.codec.JPEGCodec;
import loci.formats.codec.PackbitsCodec;
import loci.formats.gui.AWTImageTools;
import loci.formats.gui.LegacyQTTools;
import loci.formats.meta.MetadataStore;

/**
Expand Down Expand Up @@ -99,10 +98,6 @@ public class PictReader extends FormatReader {
/** Color lookup table for palette color images. */
protected byte[][] lookup;

/** Helper reader in case this one fails. */
protected LegacyQTTools qtTools = new LegacyQTTools();

private boolean legacy = false;
private Vector<Long> jpegOffsets = new Vector<Long>();

// -- Constructor --
Expand All @@ -113,13 +108,6 @@ public PictReader() {
domains = new String[] {FormatTools.GRAPHICS_DOMAIN};
}

// -- PictReader API methods --

/** Control whether or not legacy reader (QT Java) is used. */
public void setLegacy(boolean legacy) {
this.legacy = legacy;
}

// -- IFormatReader API methods --

/* @see loci.formats.IFormatReader#get8BitLookupTable() */
Expand Down Expand Up @@ -163,20 +151,6 @@ public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
return buf;
}

if (legacy || strips.size() == 0) {
in.seek(512);
byte[] pix = new byte[(int) (in.length() - in.getFilePointer())];
in.read(pix);
byte[][] b = AWTImageTools.getBytes(
AWTImageTools.makeBuffered(qtTools.pictToImage(pix)));
pix = null;
for (int i=0; i<b.length; i++) {
System.arraycopy(b[i], 0, buf, i*b[i].length, b[i].length);
}
b = null;
return buf;
}

// combine everything in the strips Vector

if ((getSizeY()*4 < strips.size()) && (((strips.size() / 3) %
Expand Down Expand Up @@ -243,7 +217,6 @@ public void close(boolean fileOnly) throws IOException {
strips = null;
versionOne = false;
lookup = null;
legacy = false;
jpegOffsets.clear();
}
}
Expand Down

0 comments on commit dd3f71b

Please sign in to comment.