can any tell me how to recognize different type of images like jpg, gif, bmp inside word Doc using VBA.
can any tell me how to recognize different type of images like jpg, gif, bmp inside word Doc using VBA.
Hi =?Utf-8?B?cmFuaQ==?=, This isn't possible. Word tends to convert graphics to file types it can work with, not maintain the original graphic format. And even when it does (later versions retain JPG, for example), the object model doesn't expose any of this information. Cindy Meister INTER-Solutions, Switzerland http://www.**--****.com/ (last update Jun 17 2005) http://www.**--****.com/ This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-)
1.Control image property locking image file even after image cleared
Hi All When I set a buttons image to a image file in the properties window it seems to lock the file even if I clear the button image property in the properties window Sometimes I am editing the icon/bitmap and connect it to the button to see what it looks like Then I want to make further changes so I clear the image from the buttons image property, but when I edit and try to save the image file I get a message saying it is in use by another program I have to close the VB.net 2005 solution to free it up Any ideas Regards Steve
2.VB6 create image, save image to memory, send image to asp
Ok, here is the deal, ive search all around and no one has this. In visual basic 6 ( activex dll ) 1. create a image in a picturebox control 2. save the picture in memory (not to disk) 3. place the saved picture into a stream or object that can be passed to an ASP page In asp classic 1. calls activex dll to generate image 2. set varable/object to the resulting image 3. display the image in the http ( as a locally cached .jpg, bmp, gif or png, i dont care about format )
3.Joining multiple images together to form 1 single .jpg image
On Jun 30, 8:05爌m, Onur G鼁el < XXXX@XXXXX.COM > wrote: > On Jun 30, 6:43爌m, Paul < XXXX@XXXXX.COM > wrote: > > > > > > > Hi, > > > I am having trouble getting my VB app to join images on top of each > > other to form a single file. > > > All my images are the same width and height and I would like to join > > them together, one of top of the other. > > > My code compiles but does not give the right result! > > > ????Dim jpg1 As String = "c:\existing_image_1.jpg" > > ????Dim jpg2 As String = "c:\existing_image_2.jpg" > > ????Dim jpg3 As String = "c:\new_image.jpg" > > > ????Dim img1 As Image = Image.FromFile(jpg1) > > ????Dim img2 As Image = Image.FromFile(jpg2) > > > ????Dim width As Integer = Math.Max(img1.Width, img2.Width) > > ????Dim height As Integer = img1.Height + img2.Height + 20 > > > ????Dim img3 As New Bitmap(width, height) > > ????'MsgBox(img3.Width & " width, " & img3.Height & " height ") > > ????Dim g As Graphics = Graphics.FromImage(img3) > > > ????g.Clear(Color.Empty) > > ????g.DrawImage(img1, New Point(0, 0)) > > ????g.DrawImage(img1, New Point(0, img1.Height)) > > ????g.Dispose() > > > ????img1.Dispose() > > ????img2.Dispose() > > > ????img3.Save(jpg3, System.Drawing.Imaging.ImageFormat.Jpeg) > > ????img3.Dispose() > > > Its showing it like this.. Please excuse the crude diagram! > > > _________________________ > > | ?st image ?| ???????????爘 > > | displays ??爘 ???????????爘 > > |__here _____| ???????????爘 > > | ?????????????????????爘 > > | ?????????????????????爘 > > | ????燽lack background ????| > > | ?????????????????????爘 > > | ?????????????????????爘 > > |____________ ???????????| > > | 2nd image ?爘 ???????????| > > |displays here | ???????????| > > |___________ |_____________| > > > This is how I would like to to appear... > > > ____________________ > > | ????????????????爘 > > | ????1st image ?????| > > | ?????here ????????| > > | ????????????????爘 > > | ????????????????爘 > > |___________________| > > | ????????????????爘 > > | ????????????????爘 > > | ?????nd image ????| > > | ?????爃ere ???????爘 > > | ????????????????爘 > > |___________________| > > > Any help is much appreciated. > > > Thanks > > > Paul > > Hi Paul, > > This code should do what you want, if all pictures have the same > width, specifying width of one of them is enough to specify the entire > picture's width, and the entire height is calculated by adding all the > heights of pictures, that is img3 as follows: > > Dim jpg1 As String = "c:\existing_image_1.jpg" > Dim jpg2 As String = "c:\existing_image_2.jpg" > Dim jpg3 As String = "c:\new_image.jpg" > > Dim img1 As Image = Image.FromFile(jpg1) > Dim img2 As Image = Image.FromFile(jpg2) > > ' If all images have same width > ' specifiying one's width and > ' is enough, eg: img1 > > Dim width As Integer = img1.Width > ' If All the pictures have same height, multiplying > ' one of pic's height with picture amount is enough > Dim height As Integer = img1.Height * 2 > > Dim img3 As New Bitmap(width, height) > > Dim g As Graphics = Graphics.FromImage(img3) > > g.DrawImage(img1, 0, 0, img1.Width, img1.Height) > g.DrawImage(img2, 0, img1.Height, img2.Width, img2.Height) > > img1.Dispose() > img2.Dispose() > > img3.Save(jpg3, System.Drawing.Imaging.ImageFormat.Jpeg) > > Hope this helps, > > Onur G鼁el- Hide quoted text - > > - Show quoted text - Hi Onur, Thank you very much for the working code! It works like a charm. Now my next step is to give support for more than 2 images and add a nice GUI! Thanks for setting me on my way! Paul
4.Convert Color image to Gray Shade Image
Hi all, I'm creating a custom button control. I need to show a color image when the button control is enabled and a gray shade of the same image when the button control is disabled. How can i convert a color image to a gray image in VB 2005. Thanks, Sugan Chennai, INDIA
5.Combining Ink Strokes with Background Image into a Bit map Image
H I need to combine Ink strokes with the background image into a bit map. Would appreciate any help Thank A
6. Image Button Problem: "SetPixel is not supported for images with indexed pixel formats"
Users browsing this forum: No registered users and 74 guest