bool CPicture::CreateThumbnailFromSurface(const unsigned char *buffer, int width, int height, int stride, const CStdString &thumbFile) { CLog::Log(LOGDEBUG, "cached image '%s' size %dx%d", thumbFile.c_str(), width, height); if (URIUtils::GetExtension(thumbFile).Equals(".jpg")) { CJpegIO jpegImage; if (jpegImage.CreateThumbnailFromSurface((BYTE *)buffer, width, height, XB_FMT_A8R8G8B8, stride, thumbFile.c_str())) return true; } DllImageLib dll; if (!buffer || !dll.Load()) return false; return dll.CreateThumbnailFromSurface((BYTE *)buffer, width, height, stride, thumbFile.c_str()); }
bool CPicture::CreateThumbnailFromSurface(const unsigned char *buffer, int width, int height, int stride, const CStdString &thumbFile) { DllImageLib dll; if (!buffer || !dll.Load()) return false; return dll.CreateThumbnailFromSurface((BYTE *)buffer, width, height, stride, thumbFile.c_str()); }