Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Printing high Quality Pictures through Visual Basic

Posted on 2002-07-15
9
Medium Priority
?
367 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
9 Comments
 
LVL 17

Accepted Solution

by:
inthedark earned 800 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

916 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