Author |
Topic |
graph_man
326 Posts |
Posted - Jun 28 2018 : 06:22:07
|
Is it possible to print color annotations without converting image to color? Black-and-white image has big size after converting into color and out of memory messages appear. |
|
xequte
38182 Posts |
Posted - Jun 28 2018 : 20:04:31
|
Sorry, can you confirm what code you are using?
Also, if you are getting an out of memory error, please show us how to reproduce that too (and ensure LegacyBitmap = False).
Nigel Xequte Software www.imageen.com
|
|
|
graph_man
326 Posts |
Posted - Jun 29 2018 : 04:40:52
|
I use IO->Params->ImagingAnnot to add objects.
IO->PrintImage to print
LegacyBitmap = False
Image size is 10000x13000 px |
|
|
xequte
38182 Posts |
Posted - Jul 01 2018 : 23:09:29
|
This is resolved for 8.0.1. You can email me for updated source code earlier if you like.
Nigel Xequte Software www.imageen.com
|
|
|
graph_man
326 Posts |
Posted - Oct 19 2018 : 06:08:33
|
I see the same error in the latest version.
I have black-and-white image and color annotations (IO->Params->ImagingAnnot). ImageEnVect1->IO->PrintImage
See "OutOfmemory" error
I can send test file
|
|
|
graph_man
326 Posts |
Posted - Oct 19 2018 : 06:43:58
|
But if I use before printing:
ImageEnProc->ConvertTo24Bit();
ImafeEnvect1->CopyObjectsToBack(ObjAntialiasing, true);
it works without error messages |
|
|
xequte
38182 Posts |
Posted - Oct 19 2018 : 20:30:54
|
Please email me your test file.
Nigel Xequte Software www.imageen.com
|
|
|
xequte
38182 Posts |
Posted - Oct 21 2018 : 19:46:57
|
Hi
I'm afraid I cannot reproduce that.
I have loaded the image as follows:
ImageEnVect1.IO.LoadFromFile('d:\D-10-4010-11.tif');
ImageEnVect1.IO.Params.ImagingAnnot.CopyToTImageEnVect();
And printed the following ways:
Printer.BeginDoc;
ImageEnVect1.IO.PrintImage();
Printer.EndDoc;
Printer.BeginDoc;
ImageEnVect1.IO.PrintImage(Printer.Canvas, 0, 0, 0, 0, ievpCenter, iehpCenter, iesFitToPage, 0, 0, 1, True);
Printer.EndDoc;
ImageEnVect1.IO.DoPrintPreviewDialog( iedtDialog, '', True );
All print as expected.
Nigel Xequte Software www.imageen.com
|
|
|
graph_man
326 Posts |
Posted - Oct 22 2018 : 05:01:07
|
I see error message. Why there is no message if I combine annotations before?
ps What are settings of you printer? I need to print in color and resolution 600 dpi. |
|
|
graph_man
326 Posts |
Posted - Oct 22 2018 : 10:04:19
|
I created the empty project and again see this error message (Out of memory).
void __fastcall TForm9::btnOpenClick(TObject *Sender) { ImageEnVect1->IO->Params->ImageIndex = 0; ImageEnVect1->IO->LoadFromFile("C:\\TEMP1\\D-10-4010-11.tif");
if (ImageEnVect1->IO->Params->ImagingAnnot->ObjectsCount != 0) ImageEnVect1->IO->Params->ImagingAnnot->CopyToTImageEnVect(ImageEnVect1); } //---------------------------------------------------------------------------
void __fastcall TForm9::btnPrintClick(TObject *Sender) { TPrinter *MyPrinter; MyPrinter = Printer(); MyPrinter->BeginDoc();
ImageEnVect1->IO->PrintImage(MyPrinter->Canvas, 0, 0, 0, 0, ievpCenter , iehpCenter, iesFitToPage, 0, 0, 1, true, false, "", 5, clBlack);
MyPrinter->EndDoc(); } //--------------------------------------------------------------------------- |
|
|
xequte
38182 Posts |
Posted - Oct 22 2018 : 17:08:14
|
Hi
Your example code works fine here. I am printing at 600dpi and full color to an HP LaserJet.
So I presume you don't get an error when you set the PrintAnnotations parameter to false?
Nigel Xequte Software www.imageen.com
|
|
|
graph_man
326 Posts |
Posted - Oct 22 2018 : 17:12:49
|
I don't see error message if I combine annotations with background and use print again.
ImageEnProc->ConvertTo24Bit();
ImafeEnvect1->CopyObjectsToBack(ObjAntialiasing, true);
and PRINT with the same parameters
it works without error messages
ps I tested on Windows 7 (32 bit) and Windows 10 (64 bit) |
|
|
graph_man
326 Posts |
Posted - Oct 22 2018 : 17:26:27
|
> So I presume you don't get an error when you set the PrintAnnotations parameter to false?
There are no annotations after combining. I delete them. |
|
|
xequte
38182 Posts |
Posted - Oct 22 2018 : 22:51:36
|
Hi
I mean when you use your example code above. I presume it works without error when you change to
ImageEnVect1->IO->PrintImage(MyPrinter->Canvas, 0, 0, 0, 0, ievpCenter , iehpCenter, iesFitToPage, 0, 0, 1, FALSE, false, "", 5, clBlack);
Maybe you can create a temporary bitmap using DrawObjectsToBitmap and print that instead.
https://www.imageen.com/help/TImageEnVect.DrawObjectsToBitmap.html
Nigel Xequte Software www.imageen.com |
|
|
graph_man
326 Posts |
Posted - Oct 23 2018 : 04:41:09
|
I use ImageEnVect1->IO->PrintImage(MyPrinter->Canvas, 0, 0, 0, 0, ievpCenter , iehpCenter, iesFitToPage, 0, 0, 1, TRUE, false, "", 5, clBlack); |
|
|
graph_man
326 Posts |
Posted - Oct 23 2018 : 13:31:49
|
What is the difference of printing color bitmap with a size of 10,000x10,000 pixels with the option PrintAnnotations = FALSE and black-and-white image with a size of 10,000x10,000 pixels with color annotations with the option PrintAnnotations = TRUE ??? |
|
|
w2m
USA
1990 Posts |
Posted - Oct 23 2018 : 13:41:43
|
Look in the help file. If true and the image contains imaging or ImageEn annotations they will be printed
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
|
|
xequte
38182 Posts |
Posted - Oct 23 2018 : 20:30:20
|
Hi
> What is the difference of printing color bitmap with a size of > 10,000x10,000 pixels with the option > PrintAnnotations = FALSE > and > black-and-white image with a size of 10,000x10,000 pixels with > color annotations with the option > PrintAnnotations = TRUE
In the first case, it prints the image directly.
In the second, a copy of the image is created, its pixelformat upscaled to 24bit and annotations drawn.
Nigel Xequte Software www.imageen.com
|
|
|
graph_man
326 Posts |
Posted - Oct 24 2018 : 05:57:57
|
Maybe in the second case the size of the canvas is larger than the original image and therefore an error appears? |
|
|
xequte
38182 Posts |
|
graph_man
326 Posts |
Posted - Oct 29 2018 : 10:22:37
|
I'm trying to use
#include "iexHelperFunctions.hpp"
IEBitmap1->PrintImage(.....);
and see
[BCC32 Error]E2316 'PrintImage' is not a member of 'TIEBitmap' |
|
|
Topic |
|