Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-08-2019, 11:50 AM   #1
eshai
Newly Registered User
 
Join Date: Jul 2015
Posts: 86
Thanks: 12
Thanked 5 Times in 5 Posts
eshai is on a distinguished road
resize image and DPI

I searched the web but found nothing

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

eshai is offline   Reply With Quote
Old 09-08-2019, 11:56 AM   #2
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,431
Thanks: 112
Thanked 2,855 Times in 2,601 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: resize image and DPI

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
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 09-08-2019, 12:04 PM   #3
eshai
Newly Registered User
 
Join Date: Jul 2015
Posts: 86
Thanks: 12
Thanked 5 Times in 5 Posts
eshai is on a distinguished road
Re: resize image and DPI

Quote:
Originally Posted by

[QUOTE
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 Uncle Gizmo; 09-08-2019 at 02:10 PM. Reason: removed extra quote tag
eshai is offline   Reply With Quote
Old 09-09-2019, 05:19 AM   #4
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 14,382
Thanks: 87
Thanked 1,648 Times in 1,530 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: resize image and DPI

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/off...cation.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/off...access.printer

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

https://docs.microsoft.com/en-us/off...r.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/off...rintobjquality

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.
__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
Old 09-09-2019, 06:13 AM   #5
eshai
Newly Registered User
 
Join Date: Jul 2015
Posts: 86
Thanks: 12
Thanked 5 Times in 5 Posts
eshai is on a distinguished road
Re: resize image and DPI

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
eshai is offline   Reply With Quote
Old 09-09-2019, 08:48 AM   #6
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 14,382
Thanks: 87
Thanked 1,648 Times in 1,530 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: resize image and DPI

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.
__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
Old 09-09-2019, 09:14 AM   #7
eshai
Newly Registered User
 
Join Date: Jul 2015
Posts: 86
Thanks: 12
Thanked 5 Times in 5 Posts
eshai is on a distinguished road
Re: resize image and DPI

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

eshai is offline   Reply With Quote
Old 09-10-2019, 12:33 AM   #8
Galaxiom
Super Moderator
 
Join Date: Jan 2009
Location: NSW Australia
Posts: 11,610
Thanks: 89
Thanked 1,493 Times in 1,409 Posts
Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold
Re: resize image and DPI

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.

Galaxiom is offline   Reply With Quote
Reply

Tags
dpi , image , printing , vba

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
resize online image to fit web browser qupe Forms 1 11-30-2016 04:23 PM
Export image to Excel and resize adh123 Modules & VBA 1 12-23-2015 07:09 AM
help Resize image haithemelkhier Modules & VBA 2 05-18-2012 12:22 AM
Resize image box on rpt oxicottin Reports 10 08-31-2010 10:49 AM
Resize and Center Image Frame ssteinke Sample Databases 3 07-06-2006 02:45 PM




All times are GMT -8. The time now is 11:57 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World