Skip to content

Commit

Permalink
Merge pull request #714 from NicolaVerbeeck/main
Browse files Browse the repository at this point in the history
Also include number of components in the jpeg info
  • Loading branch information
brendan-duncan authored Jan 23, 2025
2 parents a66151f + d586e9e commit bebe693
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/formats/jpeg/jpeg_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ class JpegData {
if (frame != null) {
info
..width = frame!.samplesPerLine!
..height = frame!.scanLines!;
..height = frame!.scanLines!
..numComponents = frame!.components.length;
}
frame = null;
frames.clear();
Expand Down
3 changes: 3 additions & 0 deletions lib/src/formats/jpeg/jpeg_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ class JpegInfo implements DecodeInfo {
int get numFrames => 1;
@override
Color? get backgroundColor => null;

/// The number of components in the image
int numComponents = 0;
}

0 comments on commit bebe693

Please sign in to comment.