mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
JPEG compression
This commit is contained in:
parent
f51b195486
commit
4211c267a6
5 changed files with 174 additions and 2 deletions
|
@ -100,6 +100,14 @@ ImageData* ImageData::Duplicate()
|
|||
return copy;
|
||||
}
|
||||
|
||||
bool ImageData::LoadFromMemory(void* ptr, int size)
|
||||
{
|
||||
SetSrcData((uint8*)ptr, size);
|
||||
bool result = ReadData();
|
||||
mSrcData = NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
bool ImageData::LoadFromFile(const StringImpl& path)
|
||||
{
|
||||
int size = 0;
|
||||
|
@ -126,6 +134,7 @@ void ImageData::SetSrcData(uint8* data, int dataLen)
|
|||
mSrcDataLen = dataLen;
|
||||
}
|
||||
|
||||
|
||||
void ImageData::PremultiplyAlpha()
|
||||
{
|
||||
if (mBits == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue