Loading tif images by vba

BurqanKpln

New Member
Joined
Jul 21, 2023
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hi,
I am struggling about the loading tif format of the image by vba.
Is there any way to get a tiff image to display on a vba form without having to convert them all to a different format?
We have an image library storing images in Tiff format. The VBA Image object does not display images in tiff format. But due to the nature of the library, I cannot convert them for the purpose of my project.

Image1.Picture = LoadPicture(FullFileName_of_image.tif)

Would be grateful for any positive guidance.
 
Hi,
I process one image at a time when I import from a document. Does it make sense if I convert it to another image type? That would also require brightness/contrast modification.
Thank you so much. Looking forward to hearing
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi Dan,
Have you had a chance to dig your code for option 3? This last thing on brightness I need to finish till tomorrow :(
 
Upvote 0
Hi - apologies for the delay in responding, but I've been in the process of moving countries, and that coupled with jetlag has taken me out of action for a week. Hopefully you've managed to solve your task.
 
Upvote 0
Hi again,
I just came back from my vacation and the issue is still unsolved although I tried several ways. I would very appreciate if you can help with your option 3 for brightness change :) If it takes so much time, no problem.
 
Upvote 0
Hi - sorry, I only just saw this. I was actually looking at this issue the other day, and wondered whether you still needed it. It is something that may take a little while (for me, at least), but happy to do it provided there isn't a burning desire for it to be done ASAP. I would suggest starting a new thread though - it has to do more with image manipulation that display TIF files, and it will be more useful to other people with a similar requirement/issue to this. Also, if you start a new thread, more people will see it (and potentially help out) rather than just you, me, and jolivanes.

On that last point, looking again at jolivane's very good suggestion re: using the WIA COM object, I am reminded of a related post of the same site which uses the WIA COM Object to convert the image to greyscale: VBA – WIA – Convert Image to Grayscale | DEVelopers HUT
Now I know it's not what you're after exactly, but if you use this method, along with the code you tried at Post 9, you will have the solution for you. Again, it will be slow. But if speed is the thing you're after, and you have a lot of images you need to bulk convert/process, you should use a command line tool, like ImageMagick.

Just some thoughts. Let us know if you get around to starting a new thread, setting out what you're after - it would make sense to link back to this thread to avoid any concern that you're asking the same question multiple times (which you're not).
 
Upvote 0
Hi Dan,
Unfortunately, its been a long time I could not get an answer after I opened a new thread about brightness change of an image loaded in UI.
 
Upvote 0
Hi Dan,
Can you still help me on this issue? If not, then I can leave my work without this feature
 
Upvote 0
Did you try the other options i mentioned above? Also, you never sent the link to thread you started on the topic.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top