enrichPhoto static method
Implementation
static Future<PhotoWithThumbnail> enrichPhoto(
String baseName, String thumbnailBaseName, Uint8List imgBytes) async {
var img = imgpackage.decodeImage(imgBytes);
if (img == null) {
throw Exception('Can not decode image with baseName $baseName');
}
var thumbNailData = getThumbnail(img);
return PhotoWithThumbnail(
photoData: ImageData(
baseName: baseName,
width: img.width,
height: img.height,
data: imgBytes),
thumbNailData: ImageData(
baseName: thumbnailBaseName,
width: thumbnailSize,
height: thumbnailSize,
data: thumbNailData),
);
}