image control problem (1 Viewer)

John Sh

Member
Local time
Tomorrow, 03:13
Joined
Feb 8, 2021
Messages
114
Is there a way to brighten a photo in imagecontrol other than brightening the image itself. My images display normally in a viewer, honeyview, but are barely visible in the imagecontrol box.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:13
Joined
Feb 28, 2001
Messages
21,554
Barely visible? As in "too dark" or "too light" or "low contrast" or ...? Can you be a bit more specific?
 

conception_native_0123

Well-known member
Local time
Today, 10:13
Joined
Mar 13, 2021
Messages
1,323
image control is just a container for the image. so no, I don't believe you can do what you want. have you tried to manipulate the image in a photo program like photoshop or something?
 

John Sh

Member
Local time
Tomorrow, 03:13
Joined
Feb 8, 2021
Messages
114
image control is just a container for the image. so no, I don't believe you can do what you want. have you tried to manipulate the image in a photo program like photoshop or something?
I thought that would be the case. I have increased the brightness by 25% above what looks good in a viewer but the image is still very dark in the image control. I may have to make two copies, one for access and one copying. Thank for your response.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:13
Joined
Feb 28, 2001
Messages
21,554
After reviewing the thread, I see you did talk about brightness. The issue is that unlike Word or Powerpoint, Access does not have an image editing tool that it can call. I looked and there does not seem to be anything in the image control to help. I looked for a possible .DLL file that could diddle with photo properties, but so far, no luck in finding anything in my old version of Access. So unless someone can point to a photo manager tool that exposes its controls via COM techniques, I'm going to have to say NO on your question. But that DOES depend on the fact that I can't find a tool. If someone else finds one, well and good.
 

John Sh

Member
Local time
Tomorrow, 03:13
Joined
Feb 8, 2021
Messages
114
Thanks Doc_Man. When I posted this thread it was in the unlikely hope there was a solution. My own checking indicated no such luck but there is a wealth of information out there just waiting to be tapped. This time there was no flow.
John
 

D_Walla

New member
Local time
Today, 16:13
Joined
Aug 1, 2021
Messages
9
One option could be to use the ImageMagick COM Object. It's free, easy to use, and this kind of work is exactly what it was made for.

Failing that, it would be less than ideal, but could you not conceivably use the WIA COM Object to manipulate the image?

I checked and of all the image processing options, brightness is not one of the them, but it does give you access to the ARGB values of the image, and if you take the view that adjusting brightness is pushing all RGB values of a pixel in an image proportionally towards white, then I suppose it could be done. By way of example, the following will change every 21st pixel in a given image to pink:

Code:
Dim Img 'As ImageFile, IP As ImageProcess
Dim v 'As Vector, i As Long
Set Img = CreateObject("WIA.ImageFile")
Set IP = CreateObject("WIA.ImageProcess")
Img.LoadFile "C:\WINDOWS\Web\Wallpaper\Bliss.bmp"
Set v = Img.ARGBData
For i = 1 To v.Count Step 21
v(i) = &HFFFF00FF 'opaque pink (A=255,R=255,G=0,B=255)
Next
IP.Filters.Add IP.FilterInfos("ARGB").FilterID
Set IP.Filters(1).Properties("ARGBData") = v
Set Img = IP.Apply(Img)
Img.SaveFile "C:\WINDOWS\Web\Wallpaper\BlissARGB.bmp"

I also wonder if the same could be accomplished with the GDI+ APIs, but it may just be along the same line of logic.

There is always Excel as well - it has an IncrementBrightness method to its Shapes/Picture objects. But then the trick is exporting it back into an image, which invariably involves either a capture of the picture via API or using the ChartObject to export it into an image - again, not a great solution.
 

John Sh

Member
Local time
Tomorrow, 03:13
Joined
Feb 8, 2021
Messages
114
Thank you D.Walla. I finished up increasing the brightness of the images by one stop in Lightroom and increasing the size of the displayed photo. These actions, together, improved the visibility of the photos.
I will keep your solution in mind for future projects.
John
 

Users who are viewing this thread

Top Bottom