Transparent Rotated Image Shows Original
Aug 15, 2010
I have a image with a transparent background. I clone it, rotate it, and save it in a picture box. Works fine (in that I can see the original object overlaid on the background image below it). However, the original unrotated image is also superimposed on the .image layer *with* the rotated one. Try as I can, I can't stop it from appearing.
Curiously enough, if I change the image to non-transparent (a .bmp instead of a .gif, for example), I don't have the problem. Of course, I also can't see the background {:<(
Code snippet:
Dim myGraphic As Graphics
Dim m As Image
m = ArtHorImage.Clone
[Code]....
View 3 Replies
ADVERTISEMENT
Sep 18, 2009
I can't remember exactly if this is possible or not but what I am attempting I would think should theoretically be possible. I know it is possible in WPF but the company I am working for doesn't want to make the transition just yet. Basically what I want is to use a background image on a form for the background and I have a docked control on the right and left. I have set the background on both of these docked controls to transparent however it is showing the back color rather than the background image. I tried, rather than setting the background image property, to override the onpaintbackground and onpaint events and use e.graphics.draw(picture, me.clientrectangle) but it still seems to just pick up the backcolor as the true transparent background so I'm wondering if it's possible to get it to show the background image through the control rather than the backcolor of the form?
View 3 Replies
Sep 8, 2009
I'm writing a program that print images in full page. I.E, I print image on A4 paper, landscape. When I print an image without rotating it (the image IS landscape), the image uses all the space of the page, and is not cropped. it is OK. The print job is about 1.5 Mb. When I print an image WITH rotating it (the image IS PORTRAIT ), the image uses all the space of the page, and is not cropped. it is OK. The print job is about 28 Mb. The images are about 2000x3000 pixels, and stored in JPEG files (about 2.5 Mb each). I suppose that the 28 Mb should be the "uncompressed" size of the picture, and 1.5Mb, the compressed size...
By the way, When I look at the task manager, my application memory usage grows by job size, which seems to be OK. It grows either 1,5 Mb if no rotation is occured, and 25-30Mb when rotation occured.
Since I can print hundreds of image at once, my print queue will grow abnormaly if I need to rotate all
View 8 Replies
Feb 18, 2011
is it possible for an image or picture to be rotated via button click.?
View 10 Replies
Jun 1, 2010
I know that you can pass a Point array to the DrawImage method of the Graphics object to apply rotation, skewing and flipping, but I'm having trouble figuring out how to calculate the rotation. So far I've got:
Dim radius As Integer = Math.Sqrt((rect.Width / 2) ^ 2 + (rect.Height / 2) ^ 2)
Dim dX As Integer = RadToDeg(Math.Cos(DegToRad(angle))) * radius
Dim dY As Integer = RadToDeg(Math.Tan(DegToRad(angle))) * dX
Dim new_upper_left_corner As New Point(rect.X + (rect.Width 2) - dX, rect.Y + (rect.Height 2) - dY)
This is all just off the top of my head so far, I'm not sure if it's right. How do I calculate the other points on the rectangle, and is there a built-in VB.NET method that's much easier? (Apart from Graphics.RotateTransform, which is slow and also rotates around 0,0.)
View 3 Replies
Aug 6, 2009
Im working on in VB.net. Basically I�m trying to create a nice looking control that draws several PNG images (stars in this example) that light up as you hover the cursor over them. This side of things is working perfectly (see picture 1).
[URL]
The problem is trying to make it work using a transparent background for the control. I can make the control transparent by setting the controls back color and using Me.Setstyle to enable transparency support, but every time the image refreshes to show any lit stars it repaints over the stars again � making the shaded areas darker each time. This results in a horrible mess (see picture 2).
[URL]
Next I tried to clear the background each time a repaint occurs so that the stars are drawn on a blank canvas each time to stop this problem. The only way I know how to do this is to use graphics.clear(Color.Transparent) before my code to paint the star images. But this does not work as the control shows a black background instead of a transparent one (see picture 3)!
[URL]
away the background to leave me with a transparent canvas to paint images onto? And is anyone smart enough to come up with a solution to this irritating issue?
View 9 Replies
Aug 15, 2010
how can i correctly position a rotated image in an irregular region picturebox?
View 1 Replies
Aug 20, 2010
I try to add text strings to an image but keep the metadata of the original image. The problem is How can I save ImgMetaData (from the original image) to the new image?
Here are the codes:
Public ImgMetaData As BitmapMetadata
Public myImageCodecInfo As ImageCodecInfo
Public myEncoder As Encoder
[Code]....
View 12 Replies
Feb 8, 2011
I have an application which first load an 1200*800 image into an 600*400 picturebox. When i crop the whole image in picturebox and save it, the size will be 600*400. How can i make it save in 1200*800?
View 6 Replies
May 23, 2012
VB Code:
Dim fi As New FileInfo(PicPath)
Dim di As DirectoryInfo = Directory.CreateDirectory(Path)
Dim FileNameRandThumb As String = POath & ThumbFileName
[Code]....
This Code results in copying the Image correctly but the original image is now 0kb
View 1 Replies
Feb 1, 2010
I currently have a picture box and it has a MouseHover event. When the picture box is hovered the picture will change images. But when it is not being hovered upon I need the picture to switch back to the original image. Is there anyway to do this.
Currently I have:
Private
Sub picOpen_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles picOpen.MouseHover
picOpen.BackColor = Color.White
End Sub
View 2 Replies
May 23, 2012
I have a black & white image (find below)I want to print that image by clearing the background(i.e black dots in the form of rectagle)If i print the below bank check it is printing completly black (unable to read the content). Pls do the needful. Many Thanks
View 4 Replies
Aug 25, 2011
The object is to load an image into a picturebox, then save a new copy of the image in a different location, but with the height and width of the image box not the original file's height and width but I can't figure it out. I've got the loading and saving working no problem but getting it to adopt the new size is stumping me, it just keeps saving with the original file's size properties
View 2 Replies
Aug 24, 2010
Ok I made a gif image with a transparent background, but when I draw the image to another, the background is white.
I've looked on google, but all the comes up is how to make a gif file have a transparent background, not use an existing one.
View 7 Replies
Feb 16, 2009
I have inserted PNG image (transparent background) but it can't go to transparent. I want it to be front of other label but it's gray background hide the text what i have to do with this?
View 7 Replies
Apr 7, 2009
I wish to make a bitmap image (.bmp) transparent using VB.NET code.
View 3 Replies
Oct 29, 2009
i know how to make a picturebox have a transparent image within it, and i know how to make forms transparent, but what i cant seem to figure out is how to add an image which has transparent parts to a completely transparent form and have it still look nice. you know when you find images which look really good by them selves, but then look really bad when moved to a different background cause they still have the white border (or any other colour border). is there ANY way which i can accomplish removing this border? its almost like the alpha channel that removes the ugly border, when putting the image on the form, is forgotten about and the colour of the forms background fills in the gap..
View 3 Replies
Feb 14, 2010
I'm trying to make an image in a picturebox transparent, so that i can see and click the controls behind it in the transparent area. This reason for this is that i'm trying to make a hexagonal grid that needs each cell to work independantly of each other when clicked, and needs to include a changing image. I'm trying to do this with pictureboxes, but even though i've made the GIF images i'm using transparent in photoshop, They aren't displayed as such in design view or at runtime, as the corners stay grey. I'm making a clone of the Quiz-show Blockbusters
View 6 Replies
May 28, 2012
what would be the fastest (best) way to make transparent all pixels in one image that are white on other image?
Let's say that have 2 transparent images (.png) and want to delete some portion of the first image. Pixels to be deleted (made transparent) are defined as white on the other image (some kind of deleting mask).
View 3 Replies
Mar 26, 2011
Me again. I also have a png image and a web cam video in my form. I have transparent parts on the png image that show through to the form background colour.
How do I set it so it shows the video in the background, when I put the png image over the top of the video?
At the moment its still shows straight through to the back of the form?
View 2 Replies
Nov 28, 2011
I know put 1 picturebox(or other object) transparent:
objectaname.Backcolor=color.transparent
but imagine that you have 1 image on it... the backcolor image, is showed.how can i hide it?
View 1 Replies
Mar 17, 2009
Hiwould like to set the tbox image background to transparent>
[Code]......
View 2 Replies
Apr 24, 2012
Currently the image margin is XP default blue.[code]
View 2 Replies
Dec 22, 2009
with a triangle formed object and the rest of the image(background) are transparent... how do i make the transparent area not click able?my code how it is now>
Private Sub PictureBox2_MouseDown1(ByVal sender As Object, ByVal e As MouseEventArgs) Handles PictureBox2.MouseDown
'code for picturebox not start an click event. only if the image will be clicked>>
[code]....
View 4 Replies
Jan 14, 2009
I have a forms app that contains a panel. This panel contains an picturebox - the user can then drag the picturebox image.
I need to add an image? in the panel that will not move when the user drags the picturebox image.
This image? needs to be transparent so that the picturebox image can be seen though it when drag occurs.
I've tried drawing directly on to the panel but nothing appears. Perhaps what I am drawing is behind the picturebox?
View 5 Replies
Feb 9, 2012
I started off with a VERY simple form and added a picturebox item to it. The code I was following used a procedure in the Form1.vb to override the transparent color of the image:
bmp.MakeTransparent(Color.Fuchsia)
bmp was defined in the Form's "Load" section.
Now things are different. I have more than 20 picturebox items now, each created in the Form1.Designer.vb code as follows:
Me.Tile020.Image = CType(resources.GetObject("Tile020.Image"), System.Drawing.Image)
Me.Tile020.Location = New System.Drawing.Point(922, 297)
Me.Tile020.Name = "Tile020"
Me.Tile020.Size = New System.Drawing.Size(64, 64)
Me.Tile020.TabIndex = 3
Me.Tile020.TabStop = False
The image is referenced from the resources. When I run the program, I'd like all these images to have their backgrounds transparent. None of these controls is currently referenced anywhere in the code at present. What's the best way to get them to display transparently, other than recreating them as transparent .PNG's?
View 2 Replies
Aug 29, 2010
i need to know the code for making images inside my forms slightly transparent so I can still see the form behind it.
View 1 Replies
Nov 7, 2010
I am working on my game maker and I need to make it so that a picturebox with a transparent image will show the control behind it, like if the control has a image or just a color.
View 12 Replies
Jul 2, 2010
I have a form with two overlapping images. The images are exactly the same size and location on the form. The upper image is a GIF and is set to transparent. I have set the lower image as a parent of the upper as follows:
Me.PictureBox4.Parent =
Me.PictureBox1
The transparency works fine but for some reason the upper image moves to the lower right of the parent image when I run the program.
View 2 Replies
Oct 28, 2009
I'm having problems making an image properly "transparent"
Dim x As Integer
Dim y As Integer
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
[Code] .....
The initial image is Transparent, however, once you create another image very close to it, there is a "box" around it. That "box" is what I am trying to get rid of. I have no clue on how to get rid of it. Yes, I have made the image itself, transparent, as the initial image is transparent. Just any image that makes contact with the other images show the "box".
View 5 Replies