mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 05:54:50 +00:00
Fixed: PDF export - Smoothed bitmaps
This commit is contained in:
@@ -6,8 +6,8 @@ All notable changes to this project will be documented in this file.
|
||||
- [#1015], [#1466], [#1513] Better error messages during saving, display message on out of memory
|
||||
|
||||
### Fixed
|
||||
- PDF Export - NullPointer when font of text is missing
|
||||
- PDF Export - Text position on font change
|
||||
- PDF export - NullPointer when font of text is missing
|
||||
- PDF export - Text position on font change
|
||||
- Writing DefineFont2/3 ascent/descent as SI16 - it's UI16
|
||||
- [#1660] Empty thumbnail view on remove item
|
||||
- [#1669] FILLSTYLE color handling in DefineShape3/4
|
||||
@@ -20,6 +20,7 @@ All notable changes to this project will be documented in this file.
|
||||
- [#1671] JPEG images display when not CMYK
|
||||
- Generic tag editor - remove more items at once
|
||||
- [#1669] Flash viewer - Smoothed vs non-smoothed bitmaps
|
||||
- PDF export - Smoothed bitmaps
|
||||
|
||||
## [14.3.1] - 2021-03-25
|
||||
### Fixed
|
||||
|
||||
BIN
lib/gnujpdf.jar
BIN
lib/gnujpdf.jar
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -61,6 +61,8 @@ public class PDFImage extends PDFStream implements ImageObserver, Serializable {
|
||||
|
||||
private String mask;
|
||||
|
||||
private boolean interpolate;
|
||||
|
||||
/**
|
||||
* Creates a new <code>PDFImage</code> instance.
|
||||
*
|
||||
@@ -74,14 +76,15 @@ public class PDFImage extends PDFStream implements ImageObserver, Serializable {
|
||||
*
|
||||
* @param img an <code>Image</code> value
|
||||
*/
|
||||
public PDFImage(Image img, String mask) {
|
||||
public PDFImage(Image img, String mask, boolean interpolate) {
|
||||
this();
|
||||
this.mask = mask;
|
||||
this.interpolate = interpolate;
|
||||
setImage(img, 0, 0, img.getWidth(this), img.getHeight(this), this);
|
||||
}
|
||||
|
||||
public PDFImage(Image img) {
|
||||
this(img, null);
|
||||
this(img, null, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,16 +97,17 @@ public class PDFImage extends PDFStream implements ImageObserver, Serializable {
|
||||
* @param h an <code>int</code> value
|
||||
* @param obs an <code>ImageObserver</code> value
|
||||
*/
|
||||
public PDFImage(Image img, int x, int y, int w, int h, ImageObserver obs, String mask) {
|
||||
public PDFImage(Image img, int x, int y, int w, int h, ImageObserver obs, String mask, boolean interpolate) {
|
||||
this();
|
||||
objwidth = w;
|
||||
objheight = h;
|
||||
this.mask = mask;
|
||||
this.interpolate = interpolate;
|
||||
setImage(img, x, y, img.getWidth(this), img.getHeight(this), obs);
|
||||
}
|
||||
|
||||
public PDFImage(Image img, int x, int y, int w, int h, ImageObserver obs) {
|
||||
this(img, x, y, w, h, obs, null);
|
||||
this(img, x, y, w, h, obs, null, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -310,7 +314,10 @@ public class PDFImage extends PDFStream implements ImageObserver, Serializable {
|
||||
os.write(Integer.toString(height).getBytes());
|
||||
os.write("\n/BitsPerComponent 8\n/ColorSpace /DeviceRGB\n".getBytes());
|
||||
if (mask != null) {
|
||||
os.write(("\n/SMask " + mask + "\n").getBytes());
|
||||
os.write(("/SMask " + mask + "\n").getBytes());
|
||||
}
|
||||
if (interpolate) {
|
||||
os.write("/Interpolate true\n".getBytes());
|
||||
}
|
||||
|
||||
// write the pixels to the stream
|
||||
|
||||
Reference in New Issue
Block a user