mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
LibGfx: Add data_size() accessors to Bitmap and CMYKBitmap
These return the size of the data in bytes.
This commit is contained in:
parent
0acc370f7b
commit
11b623b1fd
2 changed files with 9 additions and 2 deletions
|
@ -32,6 +32,7 @@ public:
|
|||
|
||||
[[nodiscard]] CMYK* begin();
|
||||
[[nodiscard]] CMYK* end();
|
||||
[[nodiscard]] size_t data_size() const { return m_data.size(); }
|
||||
|
||||
ErrorOr<RefPtr<Bitmap>> to_low_quality_rgb() const;
|
||||
|
||||
|
@ -67,7 +68,7 @@ inline CMYK* CMYKBitmap::begin()
|
|||
|
||||
inline CMYK* CMYKBitmap::end()
|
||||
{
|
||||
return reinterpret_cast<CMYK*>(m_data.data() + m_data.size());
|
||||
return reinterpret_cast<CMYK*>(m_data.data() + data_size());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue