resize image and DPI (1 Viewer)

eshai

Registered User.
Local time
Today, 21:43
Joined
Jul 14, 2015
Messages
193
I searched the web but found nothing:banghead:

My question is how do I change the DPI of an image
from 96 to 300

My problem is that I want to print in black and white but in 72\96 DPI
The print quality of the image is poor
I have to do it through VBA because it is a running process of snapshot and printing
 

isladogs

MVP / VIP
Local time
Today, 19:43
Joined
Jan 14, 2017
Messages
18,208
If the original image is low quality 96 dpi, converting it to 300dpi will not give you a good quality image. You cannot add detail that isn't in the original image.

If you wanted to reduce the quality there shouldn't be a problem.

Even if its possible to do this conversion in vba, the end results will not be what you want
 

eshai

Registered User.
Local time
Today, 21:43
Joined
Jul 14, 2015
Messages
193
[QUOTE said:
Even if its possible to do this conversion in vba, the end results will not be what you want

Not exactly true. Because I want to add DPI for printing
And not for the image itself (resolution quality)
All printers add the missing points themselves but it's black and white
The image comes out poor because you can add either black or white
Once I change the DPI the image quality will not change but the print will be clearer
 
Last edited by a moderator:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 13:43
Joined
Feb 28, 2001
Messages
27,128
OK, here's what you can try.

First step: Find the printer. You do this from the application object.

https://docs.microsoft.com/en-us/office/vba/api/access.application.printer

You identify the printer from the .Printers collection. You can then control some things about that printer by twiddling the properties.

https://docs.microsoft.com/en-us/office/vba/api/access.printer

It appears that you can use the .PrintQuality property to select settings.

https://docs.microsoft.com/en-us/office/vba/api/access.printer.printquality

Understand that for most printers, this is going to be limited to a few settings. Here are the typical settings available.

https://docs.microsoft.com/en-us/office/vba/api/access.acprintobjquality

Note that this doesn't get you 300 DPI unless the printer counts 300 DPI as acPRPQHigh (one of the available settings). So no guarantees. However, you can try it. Maybe it will work. Please come back and confirm that for us.
 

eshai

Registered User.
Local time
Today, 21:43
Joined
Jul 14, 2015
Messages
193
I've already set all these options in the printer driver
And it didn't help
I'm trying something new now. Export the document as PDF with 300 DPI
Then print the document
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 13:43
Joined
Feb 28, 2001
Messages
27,128
If that works OK, congrats for solving it.

If it turns out that the PDF downgrades its print density as well, you have a driver issue and need to be sure you have updated to the latest driver. Or is this a remote wi-fi printer? They sometimes won't take remote property reset commands like that. Kind of depends on the brand and the network driver.
 

eshai

Registered User.
Local time
Today, 21:43
Joined
Jul 14, 2015
Messages
193
Funny but I just got a phone that they want the pictures in color so it solves all my problems and they are ready to invest in a quality printer:D
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 04:43
Joined
Jan 20, 2009
Messages
12,851
If you do need to automate editing photographs try ImageMagick.

It is capable of a lot more than just changing dpi, all done via commndline.

VBA can build the command to edit images in any way you want.
 

Users who are viewing this thread

Top Bottom