Comments (2)
@reecefenwick: yes, you could have a look at issue #23 which for animated GIF but there is a similar function inside TIFFTweaker.
TIFFWriter writer = new TIFFWriter();
List<IFD> ifds = new ArrayList<IFD>();
FileOutputStream fout = new FileOutputStream("NEW.tif");
RandomAccessOutputStream rout = new FileCacheRandomAccessOutputStream(fout);
int writeOffset = TIFFTweaker.prepareForWrite(rout);
// Grab BufferedImage one by one and write them
BufferedImage bi = aBufferedImage;//
writeOffset = TIFFTweaker.writePage(bi, rout, ifds, writeOffset, writer);
// Keep writing until done, then finish up
TIFFTweaker.finishWrite(rout, ifds);
rout.close();
With this approach, you can set image parameters to TIFFWriter instance to control what kind of TIFF image you want to write - Full color, indexed, black and white etc.. You can even set different color types for different pages of the output multipage TIFF image.
from icafe.
Thanks @dragon66 ! Solved my memory problems with your suggestion and it's very stable now
from icafe.
Related Issues (20)
- broken dependency HOT 1
- Writing byte array or int array to a file HOT 2
- writing predefined xmp to a jpg file HOT 4
- Build error HOT 1
- Missing slf4j logger binding dependency HOT 1
- TestMetadata does not work HOT 1
- update to IPTC specification
- copy metadata from raw to jpg failed. HOT 1
- Repositories are blocked on current mnv version HOT 3
- Deploy package to github registry
- Bitmap encode to gif time cost issue HOT 3
- TIF quality issue HOT 4
- bitmap转gif摩尔纹&噪点问题 HOT 5
- Unable to found mavan dependancy ICAFE HOT 1
- Tiff图片insertExif总是throw Runtime Exception: Duplicate Tag HOT 1
- ClassNotFoundException: Didn't find class "java.beans.Introspector" HOT 1
- HEIC/HEIF HOT 1
- Deleting specific IPTC fields? (Update: Enum IPTCApplicationTag.valueOf(String) returning IllegalArgumentException) HOT 6
- TIFFReader cannot read multipage TIFF HOT 2
- Inplace meta data update for JPG files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icafe.