|
@@ -185,6 +185,15 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
|
|
|
{
|
|
|
BitmapSource frame = MergeObjectlist[i].DocThumbnail;
|
|
|
byte[] imageData = new byte[frame.PixelWidth * frame.PixelHeight * 4];
|
|
|
+ if (frame.Format != PixelFormats.Bgra32)
|
|
|
+ {
|
|
|
+ FormatConvertedBitmap covert = new FormatConvertedBitmap(frame, PixelFormats.Bgra32, frame.Palette, 0);
|
|
|
+ covert.CopyPixels(imageData, frame.PixelWidth * 4, 0);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ frame.CopyPixels(imageData, frame.PixelWidth * 4, 0);
|
|
|
+ }
|
|
|
frame.CopyPixels(imageData, frame.PixelWidth * 4, 0);
|
|
|
result = SaveDoc.InsertPage(0, frame.PixelWidth, frame.PixelHeight, imageData, CPDFDocumentImageMode.CPDFDocumentImageModeScaleToFill);
|
|
|
if (!result)
|