Solved

Printing high Quality Pictures through Visual Basic

Posted on 2002-07-15
9
365 Views
Last Modified: 2013-11-25
Hi Experts

I have to print jpeg pictures through visual basic. It is printing very fine. But the major prob is when i am printing the image i not getting the quality as i am getting through photoshop. Second problem is that in visual basic the picture size is comming ok but in photoshop it is comming in small size. why it is happening.

Any help will be higly appreciable.

loveneesh
0
Comment
Question by:loveneesh_bansal
[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
9 Comments
 
LVL 17

Accepted Solution

by:
inthedark earned 200 total points
ID: 7153812
The problem is that you printer can print at a greater definition to your screen. For example you have an image say 800*600 pixels.  Your printer can print at say 800 dots per inch and so could print this picture at a resolution of 6400*4800.  So the Photoshop software has to expand the image from to 480000 to 30720000 pixels. When it does this it uses clever software which kinda generates (guesses) at detail that is not really there.

To improve the way that you VB print routine is working and make sure that you are loading the image with its maximum possible resolution:

So use an image control with the stretch attribute.  Set the image to have the same number of pixels as the print area you wish to fill:

fullwidth = printer.scalewidth-printer.scaleleft
image1.stretch=true
image1.width = fullwidth
image1.height = fullwidth * h/w ' maintain height/width ratio
image1.picture=loadpicture(PicturePath)
(where h & w are picture's dimensions)





0
 
LVL 1

Author Comment

by:loveneesh_bansal
ID: 7153843
Hi inthedark

Thanks for your kind reply. But i am not getting what you are saying. Actually i elaborate my proble more. I am trying to generate an Icard system. Here i am using the printer object directly. I am printing 8 records per page with the image of each user. that is 8 images a page. I am resizing my image through photoshop already. But i am not gettign the actual quality. Is there any way to get the same.

With Regards
Lovenesh bansal
0
 
LVL 17

Expert Comment

by:inthedark
ID: 7153970
In VB, are you using printer.PaintPicture to print yopur images?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:loveneesh_bansal
ID: 7154186
yes i am using printer.PaintPicture. Is there any way that i store my images into the database or the path of the image into the database then call the same through crystal report.

any help

With Regards
loveneesh bansal
0
 
LVL 17

Expert Comment

by:inthedark
ID: 7168473
You can store your picture in a database using the OLE Object data type.

I think that you can drag this field onto your report, (although I have only printed Images within Access reports, I'm sure it works).

You can experiment by copy/paste a picture into an OLE Object field. You can only vierw the picture if it has been placed on a form.
0
 
LVL 1

Author Comment

by:loveneesh_bansal
ID: 7168773
Hi inthedark

I have done the same thing but not getting the image quality.

Bye
loveneesh bansal
0
 
LVL 17

Expert Comment

by:inthedark
ID: 7182267
Paste the code you are using to print the pircure.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8012214
Hi loveneesh_bansal,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept inthedark's comment(s) as an answer.

loveneesh_bansal, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 8096015
Comment from expert accepted as answer

Computer101
E-E Admin
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month5 days, 1 hour left to enroll

636 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