Skip to content

Commit

Permalink
Convert type of pixelHeight/pixelWidth to platform-independent int64_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Feb 18, 2022
1 parent 2563658 commit 76d4748
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 44 deletions.
4 changes: 2 additions & 2 deletions include/exiv2/bmffimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ namespace Exiv2
//! @name Accessors
//@{
std::string mimeType() const override /* override */;
int pixelWidth() const override;
int pixelHeight() const override;
int64_t pixelWidth() const override;
int64_t pixelHeight() const override;
//@}

Exiv2::ByteOrder endian_{Exiv2::bigEndian};
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/cr2image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ namespace Exiv2 {
//! @name Accessors
//@{
std::string mimeType() const override;
int pixelWidth() const override;
int pixelHeight() const override;
int64_t pixelWidth() const override;
int64_t pixelHeight() const override;
//@}

//! @name NOT implemented
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/crwimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ namespace Exiv2 {
//! @name Accessors
//@{
std::string mimeType() const override;
int pixelWidth() const override;
int pixelHeight() const override;
int64_t pixelWidth() const override;
int64_t pixelHeight() const override;
//@}

//! @name NOT Implemented
Expand Down
8 changes: 4 additions & 4 deletions include/exiv2/image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ namespace Exiv2 {
/*!
@brief Return the pixel width of the image.
*/
virtual int pixelWidth() const;
virtual int64_t pixelWidth() const;
/*!
@brief Return the pixel height of the image.
*/
virtual int pixelHeight() const;
virtual int64_t pixelHeight() const;
/*!
@brief Returns an ExifData instance containing currently buffered
Exif data.
Expand Down Expand Up @@ -490,8 +490,8 @@ namespace Exiv2 {
DataBuf iccProfile_; //!< ICC buffer (binary data)
std::string comment_; //!< User comment
std::string xmpPacket_; //!< XMP packet
int pixelWidth_; //!< image pixel width
int pixelHeight_; //!< image pixel height
int64_t pixelWidth_; //!< image pixel width
int64_t pixelHeight_; //!< image pixel height
NativePreviewList nativePreviews_; //!< list of native previews

//! Return tag name for given tag id.
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/mrwimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ namespace Exiv2 {
//! @name Accessors
//@{
std::string mimeType() const override;
int pixelWidth() const override;
int pixelHeight() const override;
int64_t pixelWidth() const override;
int64_t pixelHeight() const override;
//@}
}; // class MrwImage

Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/orfimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ namespace Exiv2 {
//! @name Accessors
//@{
std::string mimeType() const override;
int pixelWidth() const override;
int pixelHeight() const override;
int64_t pixelWidth() const override;
int64_t pixelHeight() const override;
//@}
}; // class OrfImage

Expand Down
2 changes: 1 addition & 1 deletion include/exiv2/pgfimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ namespace Exiv2
//! Read PGF Header size encoded in 32 bits integer.
uint32_t readPgfHeaderSize(BasicIo& iIo) const;
//! Read header structure.
DataBuf readPgfHeaderStructure(BasicIo& iIo, int& width, int& height) const;
DataBuf readPgfHeaderStructure(BasicIo& iIo, int64_t& width, int64_t& height) const;
//@}

}; // class PgfImage
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/rafimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ namespace Exiv2 {
//! @name Accessors
//@{
std::string mimeType() const override;
int pixelWidth() const override;
int pixelHeight() const override;
int64_t pixelWidth() const override;
int64_t pixelHeight() const override;
//@}

//! @name NOT implemented
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/rw2image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ namespace Exiv2 {
//! @name Accessors
//@{
std::string mimeType() const override;
int pixelWidth() const override;
int pixelHeight() const override;
int64_t pixelWidth() const override;
int64_t pixelHeight() const override;
//@}

//! @name NOT implemented
Expand Down
4 changes: 2 additions & 2 deletions include/exiv2/tiffimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ namespace Exiv2 {
//! @name Accessors
//@{
std::string mimeType() const override;
int pixelWidth() const override;
int pixelHeight() const override;
int64_t pixelWidth() const override;
int64_t pixelHeight() const override;
//@}

//! @name NOT Implemented
Expand Down
4 changes: 2 additions & 2 deletions src/bmffimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ namespace Exiv2
}
}

int BmffImage::pixelWidth() const
int64_t BmffImage::pixelWidth() const
{
auto imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
if (imageWidth != exifData_.end() && imageWidth->count() > 0) {
Expand All @@ -166,7 +166,7 @@ namespace Exiv2
return pixelWidth_;
}

int BmffImage::pixelHeight() const
int64_t BmffImage::pixelHeight() const
{
auto imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
if (imageHeight != exifData_.end() && imageHeight->count() > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/cr2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace Exiv2 {
return "image/x-canon-cr2";
}

int Cr2Image::pixelWidth() const
int64_t Cr2Image::pixelWidth() const
{
auto imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
if (imageWidth != exifData_.end() && imageWidth->count() > 0) {
Expand All @@ -65,7 +65,7 @@ namespace Exiv2 {
return 0;
}

int Cr2Image::pixelHeight() const
int64_t Cr2Image::pixelHeight() const
{
auto imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
if (imageHeight != exifData_.end() && imageHeight->count() > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/crwimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace Exiv2 {
return "image/x-canon-crw";
}

int CrwImage::pixelWidth() const
int64_t CrwImage::pixelWidth() const
{
auto widthIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
if (widthIter != exifData_.end() && widthIter->count() > 0) {
Expand All @@ -71,7 +71,7 @@ namespace Exiv2 {
return 0;
}

int CrwImage::pixelHeight() const
int64_t CrwImage::pixelHeight() const
{
auto heightIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
if (heightIter != exifData_.end() && heightIter->count() > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,12 +691,12 @@ namespace Exiv2 {
return byteOrder_;
}

int Image::pixelWidth() const
int64_t Image::pixelWidth() const
{
return pixelWidth_;
}

int Image::pixelHeight() const
int64_t Image::pixelHeight() const
{
return pixelHeight_;
}
Expand Down
4 changes: 2 additions & 2 deletions src/mrwimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace Exiv2 {
return "image/x-minolta-mrw";
}

int MrwImage::pixelWidth() const
int64_t MrwImage::pixelWidth() const
{
auto imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"));
if (imageWidth != exifData_.end() && imageWidth->count() > 0) {
Expand All @@ -58,7 +58,7 @@ namespace Exiv2 {
return 0;
}

int MrwImage::pixelHeight() const
int64_t MrwImage::pixelHeight() const
{
auto imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"));
if (imageHeight != exifData_.end() && imageHeight->count() > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/orfimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace Exiv2 {
return "image/x-olympus-orf";
}

int OrfImage::pixelWidth() const
int64_t OrfImage::pixelWidth() const
{
auto imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"));
if (imageWidth != exifData_.end() && imageWidth->count() > 0) {
Expand All @@ -63,7 +63,7 @@ namespace Exiv2 {
return 0;
}

int OrfImage::pixelHeight() const
int64_t OrfImage::pixelHeight() const
{
auto imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"));
if (imageHeight != exifData_.end() && imageHeight->count() > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/pgfimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ namespace Exiv2 {

readPgfHeaderSize(*io_);

int w = 0, h = 0;
int64_t w = 0, h = 0;
DataBuf header = readPgfHeaderStructure(*io_, w, h);

auto img = ImageFactory::create(ImageType::png);
Expand Down Expand Up @@ -278,7 +278,7 @@ namespace Exiv2 {
return headerSize;
} // PgfImage::readPgfHeaderSize

DataBuf PgfImage::readPgfHeaderStructure(BasicIo& iIo, int& width, int& height) const
DataBuf PgfImage::readPgfHeaderStructure(BasicIo& iIo, int64_t& width, int64_t& height) const
{
DataBuf header(16);
long bufRead = iIo.read(header.data(), header.size());
Expand Down
2 changes: 1 addition & 1 deletion src/pngchunk_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace Exiv2
{
namespace Internal
{
void PngChunk::decodeIHDRChunk(const DataBuf& data, int* outWidth, int* outHeight)
void PngChunk::decodeIHDRChunk(const DataBuf& data, int64_t* outWidth, int64_t* outHeight)
{
assert(data.size() >= 8);

Expand Down
4 changes: 2 additions & 2 deletions src/pngchunk_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ namespace Exiv2 {
@param outHeight Integer pointer to be set to the height of the image.
*/
static void decodeIHDRChunk(const DataBuf& data,
int* outWidth,
int* outHeight);
int64_t* outWidth,
int64_t* outHeight);

/*!
@brief Decode PNG tEXt, zTXt, or iTXt chunk data from \em pImage passed by data buffer
Expand Down
4 changes: 2 additions & 2 deletions src/rafimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace Exiv2 {
return "image/x-fuji-raf";
}

int RafImage::pixelWidth() const
int64_t RafImage::pixelWidth() const
{
auto widthIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
if (widthIter != exifData_.end() && widthIter->count() > 0) {
Expand All @@ -60,7 +60,7 @@ namespace Exiv2 {
return 0;
}

int RafImage::pixelHeight() const
int64_t RafImage::pixelHeight() const
{
auto heightIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
if (heightIter != exifData_.end() && heightIter->count() > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/rw2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace Exiv2 {
return "image/x-panasonic-rw2";
}

int Rw2Image::pixelWidth() const
int64_t Rw2Image::pixelWidth() const
{
auto imageWidth =
exifData_.findKey(Exiv2::ExifKey("Exif.PanasonicRaw.SensorWidth"));
Expand All @@ -61,7 +61,7 @@ namespace Exiv2 {
return 0;
}

int Rw2Image::pixelHeight() const
int64_t Rw2Image::pixelHeight() const
{
auto imageHeight =
exifData_.findKey(Exiv2::ExifKey("Exif.PanasonicRaw.SensorHeight"));
Expand Down
4 changes: 2 additions & 2 deletions src/tiffimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ namespace Exiv2 {
return primaryGroup_;
}

int TiffImage::pixelWidth() const
int64_t TiffImage::pixelWidth() const
{
if (pixelWidthPrimary_ != 0) {
return pixelWidthPrimary_;
Expand All @@ -148,7 +148,7 @@ namespace Exiv2 {
return pixelWidthPrimary_;
}

int TiffImage::pixelHeight() const
int64_t TiffImage::pixelHeight() const
{
if (pixelHeightPrimary_ != 0) {
return pixelHeightPrimary_;
Expand Down

0 comments on commit 76d4748

Please sign in to comment.