?
Solved

Print Bitmap like a vector Image

Posted on 2003-02-23
11
Medium Priority
?
480 Views
Last Modified: 2013-12-03
I have a Bitmap Image, and it's size about 600x600 pixels.
When I print it on A4 paper by strechdraw, it looks blurry and texts enlarges.
Is there any way to print it like a vector Image.
Or kind of solution?
The line should be same thickness, and the text must be same size.
Does anybody have a good idea?

0
Comment
Question by:Heesu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 3

Accepted Solution

by:
sfock earned 400 total points
ID: 8002428
I fear what you want is not possible. Except of you are able to write "intelligent" code that is able to identify objects in a bitmap something like OCR but not only for text but all kinds of objects ...
sorry but a bitmap is nothing than a bunch of pixels in different colors the "sense" within is made by the brain of the one who is looking at it, if you can rebuild this you'll not only solve your problem you'll advance to one of the guru's of AI ;-)

The strechdraw alogrhytems work without a knowlege of the "sense" of a picture. They do just add or remove some pixels by "guessing". In this way they usually make accepable results if you scale in the same dimensions eg. from 600x600 to 1200*1200 but their results are usually fair if you change the dimansions like 600x600 to 800x1200

sorry for that
0
 

Author Comment

by:Heesu
ID: 8029925
OK
Then, does anyone know the best way to print a bitmap image clearly?
For example, when I print a windows metafile, it looks good.
If possible, I want to change the bitmap to metafile then it may not look blurry, right?
I think there may be a way to change a bitmap to metafile.
Does anyone have idea?
Thanks,

Heesu.

0
 
LVL 3

Expert Comment

by:sfock
ID: 8031400
sorry i only can repeat me.

metafile -> Bitmap -> No Problem
Bitmap -> metafile -> Big Problem
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Heesu
ID: 8031701
sfock:

I am drawing contour lines, but the algorithm draws lines pixel by pixel.
I want to change that algorithm as a metafile, if possible.
Could you explain a little bit, how I can draw the metafile?
Thanks and sorry keep bugging you.

Heesu.

0
 

Author Comment

by:Heesu
ID: 8031829
What if I make a big virtual canvas, and draw the image?
I think it maight be helpful to make more clearer image?
What do you think about it?
0
 
LVL 3

Expert Comment

by:sfock
ID: 8034096
well okay, if the Bitmap is not your Source, then you can create a Metafile with the Class TMetafile.

To write/Paint into it you have to use the Windows gdi (Drawing) functions like

TextOut(myMetafile.Handle, //HDC hdc,     // handle of device context
    10, //int nXStart,     // x-coordinate of starting position  
    10, //int nYStart,     // y-coordinate of starting position  
    StrPCopy('Hello WMF'),//LPCTSTR lpString,     // address of string
    9//int cbString      // number of characters in string
   );

Refer the Microsoft SDK Documentation for details
0
 

Author Comment

by:Heesu
ID: 8041170
I don't know about StrPCopy or myMetafile because I am a beginner.
Could you give me a more specific example?
Your's look like drawing text.

Thanks.

Heesu.
0
 
LVL 3

Expert Comment

by:sfock
ID: 8042019
Yes you are right, in this example i am drawing a Text with a gdi-api function. You can also relace it with functions like FrameRect or something like that. I'd please you to refer the Microsfot Windows SDK Help for further details.

"myMetafile" was a synonym for an instance of the class TMetafile.(Wich i expected you'd create). After using the api seems not to be the best alternative for a beginner, I'll try an more explicit example of an easier way. You can use the classes TMetafile and TMetafileCanvas to paint the Metafile like this:

var
  emf : TMetafile;
begin
  emf := TMetafile.Create;
  try
    with TMetafileCanvas.Create(emf, 0) do begin
      try
        Brush.Color := clRed;
        Ellipse(0,0,10,10);
      finally
        Free;
      end;
    end;
    emf.SaveToFile('c:\myFirstBitmap.emf');
  finally
    emf.free;
  end;

Belonging to StrPCopy i'd suppose to open Delphi choose the menu help, then choose menu item Delhi Help (The F1 Key is able to do the same a bit easier) and change to the tab page index enter "StrPCopy" select the topic and read.
I'd also admit to continue reading the related topics mentioned at this topic.

For any details unlear with the class TMetafile go ahead like for details to StrPCopy but don't enter "StrPCopy" but "TMetafile" as search expression. ;-)

0
 

Expert Comment

by:CleanupPing
ID: 9317119
Heesu:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 10

Expert Comment

by:kacor
ID: 9956080
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept sfock's answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this second Micro Tutorial in the series,  viewers will learn more basic shortcuts and functions of Illustrator. In this tutorial you will learn about the eyedropper tool, zoom , ellipses and more.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question