Change CJPX_Decoder::GetInfo() to return a struct.
Return the image info in a struct, instead of 3 separate out parameters.
Change-Id: I5e1d86820a5aa6a53e0b1c6eec0415e6bb472689
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65750
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcodec/jpx/cjpx_decoder.h b/core/fxcodec/jpx/cjpx_decoder.h
index 1fe5043..0fdccb9 100644
--- a/core/fxcodec/jpx/cjpx_decoder.h
+++ b/core/fxcodec/jpx/cjpx_decoder.h
@@ -30,13 +30,19 @@
kIndexedColorSpace
};
+ struct JpxImageInfo {
+ uint32_t width;
+ uint32_t height;
+ uint32_t components;
+ };
+
static void Sycc420ToRgbForTesting(opj_image_t* img);
explicit CJPX_Decoder(ColorSpaceOption option);
~CJPX_Decoder();
bool Init(pdfium::span<const uint8_t> src_data);
- void GetInfo(uint32_t* width, uint32_t* height, uint32_t* components);
+ JpxImageInfo GetInfo() const;
bool StartDecode();
bool Decode(uint8_t* dest_buf,
uint32_t pitch,