mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Migrate image storage from PICT to BMP
This commit is contained in:
@@ -14,14 +14,21 @@ namespace PortabilityLayer
|
||||
}
|
||||
|
||||
bool QDPictHeader::Load(IOStream *stream)
|
||||
{
|
||||
GP_STATIC_ASSERT(sizeof(Picture) == 10);
|
||||
{
|
||||
struct PictHeader
|
||||
{
|
||||
uint8_t m_size[2];
|
||||
|
||||
BERect m_rect;
|
||||
};
|
||||
|
||||
Picture pictHeader;
|
||||
if (stream->Read(&pictHeader, sizeof(Picture)) != sizeof(Picture))
|
||||
GP_STATIC_ASSERT(sizeof(PictHeader) == 10);
|
||||
|
||||
PictHeader pictHeader;
|
||||
if (stream->Read(&pictHeader, sizeof(PictHeader)) != sizeof(PictHeader))
|
||||
return false;
|
||||
|
||||
m_frame = pictHeader.picFrame.ToRect();
|
||||
m_frame = pictHeader.m_rect.ToRect();
|
||||
if (!m_frame.IsValid())
|
||||
return false;
|
||||
|
||||
@@ -67,4 +74,4 @@ namespace PortabilityLayer
|
||||
{
|
||||
return m_frame;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user