Skip to content

Commit

Permalink
Add new methods to PBoxPDXImage
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Oct 16, 2024
1 parent 8a5bbb0 commit fef9647
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public Long getBitsPerComponent() {
return (long)((PDImage)simplePDObject).getBitsPerComponent();
}

@Override
public Boolean getisMask() {
return false;
}

@Override
public String getSubtype() {
return null;
Expand Down Expand Up @@ -112,6 +117,7 @@ public List<? extends Object> getLinkedObjects(String link) {
return this.getIntent();
case PBoxPDXImage.IMAGE_CS:
return this.getImageCS();
case PBoxPDXImage.MASK:
case PBoxPDXImage.S_MASK:
case PBoxPDXObject.OPI:
case PBoxPDXImage.ALTERNATES:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class PBoxPDXImage extends PBoxPDXObject implements PDXImage {
public static final String INTENT = "Intent";
public static final String JPX_STREAM = "jpxStream";
public static final String S_MASK = "SMask";
public static final String MASK = "Mask";

private final boolean interpolate;
private List<JPEG2000> jpeg2000List = null;
Expand All @@ -85,6 +86,11 @@ public Long getBitsPerComponent() {
return (long)((PDImageXObjectProxy)simplePDObject).getBitsPerComponent();
}

@Override
public Boolean getisMask() {
return false;
}

@Override
public Boolean getcontainsAlternates() {
COSBase pageObject = this.simplePDObject.getCOSObject();
Expand All @@ -104,7 +110,9 @@ public List<? extends Object> getLinkedObjects(String link) {
case JPX_STREAM:
return this.getJPXStream();
case S_MASK:
return this.getSMask();
return this.getSMask();
case MASK:
return Collections.emptyList();
default:
return super.getLinkedObjects(link);
}
Expand Down

0 comments on commit fef9647

Please sign in to comment.