Skip to content

Commit

Permalink
Merge pull request datalogics#69 from datalogics-mdawson/imagesprinting
Browse files Browse the repository at this point in the history
Update print and image programs
  • Loading branch information
datalogics-bruceh authored Apr 5, 2022
2 parents 5525a7b + fccbf1e commit 4079704
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ void CompleteImageTable(CosDoc doc) {
base = &ImageTable[DPI300sMask];
memmove(&current->m_attrs, &base->m_attrs, sizeof(PDEImageAttrs));
PDEColorSpace rgbSpace = PDEColorSpaceCreateFromName(ASAtomFromString("DeviceRGB"));
ASDoubleMatrix unity = {base->m_attrs.width, 0, 0, base->m_attrs.height, 0, 0};
ASDoubleMatrix unity = {static_cast<ASDouble>(base->m_attrs.width), 0, 0,
static_cast<ASDouble>(base->m_attrs.height), 0, 0};
PDEImage smImage = PDEImageCreateFromCosObjEx(&base->m_cosImage, &unity, rgbSpace, NULL);
PDEContent smContent = PDEContentCreate();
PDEContentAddElem(smContent, kPDEAfterLast, (PDEElement)smImage);
Expand Down
4 changes: 2 additions & 2 deletions CPlusPlus/Sample_Source/Images/RenderPage/RenderPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ PDEImage RenderPage::GetPDEImage(PDDoc outDoc) {
PDERelease((PDEObject)imageColorSpace);

PDERelease((PDEObject)imageMask);
delete imageBuffer;
delete maskBuffer;
delete[] imageBuffer;
delete[] maskBuffer;
} else {
// Create an image XObject from the bitmap buffer to embed in the output document
image = PDEImageCreateInCosDocEx(&attrs, sizeof(attrs), &imageMatrix, 0, cs, NULL, &filterArray,
Expand Down
Loading

0 comments on commit 4079704

Please sign in to comment.