xmp from my face-file after using the digiKam maintenance tool to create xmp files
Alignment with Phares 8.0.118.14751 for Shared and Metadata
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
|
||||
using System.Drawing;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
@ -94,19 +93,23 @@ internal static partial class Helper20250705 {
|
||||
height: rectangleFHeight,
|
||||
left: rectangleFLeft,
|
||||
top: rectangleFTop,
|
||||
suffix: $"-{i}whole-percentages.jpg");
|
||||
suffix: $"-{i}-whole-percentages.jpg");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void Extract(string file, float width, float height, double left, double top, string suffix) {
|
||||
#if SystemDrawingCommon
|
||||
RectangleF rectangle = new((float)left, (float)top, width, height);
|
||||
using (Bitmap source = new(file)) {
|
||||
using (Bitmap bitmap = new((int)width, (int)height)) {
|
||||
using (Graphics graphics = Graphics.FromImage(bitmap))
|
||||
using (Graphics graphics = Graphics.FromImage(bitmap)) {
|
||||
graphics.DrawImage(source, new RectangleF(0, 0, width, height), rectangle, GraphicsUnit.Pixel);
|
||||
}
|
||||
bitmap.Save($"{file}{suffix}");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user