ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Black-and-white image and color annotations
 New Topic  Reply to Topic
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

graph_man

326 Posts

Posted - Jun 28 2018 :  06:22:07  Show Profile  Reply
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  Show Profile  Reply
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
Go to Top of Page

graph_man

326 Posts

Posted - Jun 29 2018 :  04:40:52  Show Profile  Reply
I use
IO->Params->ImagingAnnot
to add objects.

IO->PrintImage
to print

LegacyBitmap = False

Image size is 10000x13000 px
Go to Top of Page

xequte

38182 Posts

Posted - Jul 01 2018 :  23:09:29  Show Profile  Reply
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
Go to Top of Page

graph_man

326 Posts

Posted - Oct 19 2018 :  06:08:33  Show Profile  Reply
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

Go to Top of Page

graph_man

326 Posts

Posted - Oct 19 2018 :  06:43:58  Show Profile  Reply
But if I use before printing:

ImageEnProc->ConvertTo24Bit();

ImafeEnvect1->CopyObjectsToBack(ObjAntialiasing, true);

it works without error messages
Go to Top of Page

xequte

38182 Posts

Posted - Oct 19 2018 :  20:30:54  Show Profile  Reply
Please email me your test file.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38182 Posts

Posted - Oct 21 2018 :  19:46:57  Show Profile  Reply
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
Go to Top of Page

graph_man

326 Posts

Posted - Oct 22 2018 :  05:01:07  Show Profile  Reply
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.
Go to Top of Page

graph_man

326 Posts

Posted - Oct 22 2018 :  10:04:19  Show Profile  Reply
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();
}
//---------------------------------------------------------------------------
Go to Top of Page

xequte

38182 Posts

Posted - Oct 22 2018 :  17:08:14  Show Profile  Reply
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
Go to Top of Page

graph_man

326 Posts

Posted - Oct 22 2018 :  17:12:49  Show Profile  Reply
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)
Go to Top of Page

graph_man

326 Posts

Posted - Oct 22 2018 :  17:26:27  Show Profile  Reply
> 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.
Go to Top of Page

xequte

38182 Posts

Posted - Oct 22 2018 :  22:51:36  Show Profile  Reply
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
Go to Top of Page

graph_man

326 Posts

Posted - Oct 23 2018 :  04:41:09  Show Profile  Reply
I use
ImageEnVect1->IO->PrintImage(MyPrinter->Canvas, 0, 0, 0, 0, ievpCenter ,
iehpCenter, iesFitToPage, 0, 0,
1, TRUE, false, "", 5, clBlack);
Go to Top of Page

graph_man

326 Posts

Posted - Oct 23 2018 :  13:31:49  Show Profile  Reply
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
???
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 23 2018 :  13:41:43  Show Profile  Reply
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
Go to Top of Page

xequte

38182 Posts

Posted - Oct 23 2018 :  20:30:20  Show Profile  Reply
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
Go to Top of Page

graph_man

326 Posts

Posted - Oct 24 2018 :  05:57:57  Show Profile  Reply
Maybe in the second case the size of the canvas is larger than the original image and therefore an error appears?
Go to Top of Page

xequte

38182 Posts

Posted - Oct 24 2018 :  18:24:11  Show Profile  Reply
Yes, but in both those scenarios, the image and printer canvas sizes do not change. The only thing that changes is an extra TIEBitmap is created and assigned.

Please try creating a temporary bitmap using DrawObjectsToBitmap and printing that instead.

https://www.imageen.com/help/TImageEnVect.DrawObjectsToBitmap.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

graph_man

326 Posts

Posted - Oct 29 2018 :  10:22:37  Show Profile  Reply
I'm trying to use

#include "iexHelperFunctions.hpp"

IEBitmap1->PrintImage(.....);

and see

[BCC32 Error]E2316 'PrintImage' is not a member of 'TIEBitmap'
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
Jump To: