Add image support for worksheets (PNG, JPEG, GIF, SVG)#578
Open
FlorianRauscha wants to merge 1 commit intodhatim:masterfrom
Open
Add image support for worksheets (PNG, JPEG, GIF, SVG)#578FlorianRauscha wants to merge 1 commit intodhatim:masterfrom
FlorianRauscha wants to merge 1 commit intodhatim:masterfrom
Conversation
This adds the ability to embed images in worksheet cells with support for: - PNG, JPEG, GIF raster formats with automatic detection via byte headers - SVG vector format (Office 2016+) with automatic detection - One-cell anchoring (fixed size at cell position) - Two-cell anchoring (image spans and resizes with cell range) - Custom anchoring with pixel offsets via PictureAnchor New classes: - ImageType: Enum for supported formats with byte header detection - Picture: Represents an embedded image with XML writing - PictureAnchor: EMU-based positioning (one-cell/two-cell anchors) - Pictures: Collection manager for worksheet images API additions to Worksheet: - addImage(row, col, imageData, widthPx, heightPx) - one-cell anchor - addImage(fromRow, fromCol, toRow, toCol, imageData) - two-cell anchor - addImage(anchor, imageData) - custom anchor - addImage(anchor, imageData, name, lockAspectRatio) - full control Images coexist properly with comments (separate drawing relationships). Includes comprehensive unit tests with Apache POI validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the ability to embed images in worksheet cells with support for:
New classes:
API additions to Worksheet:
Images coexist properly with comments (separate drawing relationships). Includes comprehensive unit tests with Apache POI validation.