[
https://issues.apache.org/jira/browse/PDFBOX-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14105223#comment-14105223
]
Dominic Tubach commented on PDFBOX-2273:
----------------------------------------
[~jahewson] I use it to access the image parameters dictionary through a getter
and to have a stream I can manipulate. Finally I can set the result in the
operator.
I think the code makes more obvious what I mean:
{code}
public class DTPDInlineImage extends PDInlineImage
{
private COSDictionary parameters;
private PDStream stream;
public DTPDInlineImage(COSDictionary parameters, byte[] data, Map<String,
PDColorSpace> colorSpaces)
throws IOException
{
super(parameters, data, colorSpaces);
this.parameters = parameters;
RandomAccess buffer = new RandomAccessBuffer();
buffer.write(data, 0, data.length);
stream = new PDStream(new COSStream(buffer));
}
public COSDictionary getImageParameters()
{
return parameters;
}
@Override
public PDStream getStream() throws IOException
{
return stream;
}
}
{code}
> Make PDInlineImage non-final
> ----------------------------
>
> Key: PDFBOX-2273
> URL: https://issues.apache.org/jira/browse/PDFBOX-2273
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Dominic Tubach
>
> PDInlineImage is final in the current trunk. This prevents from extending the
> class as it was possible in 1.8.
--
This message was sent by Atlassian JIRA
(v6.2#6252)