Topics
-
-
- Leaders
- 4 replies
- 11.7k views
Can someone please try to figure out what is happening here? I'm trying to apply the Multiply filter, similar to the one Photoshop uses by crossing the RGB values between two images. I'm not a pointer* guy at all and most of the code was taken from internet so I can't really say what is wrong. The function is currently working partially, that is, it applies the filter only over a third of the image from top to bottom on the left side. private void button2_Click(object sender, EventArgs e) { Bitmap srcA = (Bitmap)this.lbl_map.Image; Bitmap srcB = (Bitmap)this.lbl_paper.Image; BitmapData dataA = SetImageToProcess(srcA, new Re…
Last reply by EFileTahi-A, -
-
- 0 replies
- 6.2k views
I am having a bit of a confusing issue with PropertyItems[] and parsing EXIF data from images... private void test() { int tagMake = 0x010F; // 271 int tagModel = 0x0110; // 272 Image image = Image.FromFile("C:\\test3.jpg"); byte[] make = image.PropertyItems.Single(x => x.Id == tagMake).Value; byte[] model = image.PropertyItems.Single(x => x.Id == tagModel).Value; var encoding = new System.Text.ASCIIEncoding(); Trace.WriteLine(encoding.GetString(make)); Trace.WriteLine(encoding.GetString(model)); } The above returns these two tags from *some* images, …
Last reply by PrOpHeT, -
-
- Leaders
- 5 replies
- 4.4k views
Hi there, I have a picturebox with BackgroundImageLayout set to Zoom. So when I resize the picturebox, the background resizes too maintaining its aspect ratio. How do I get the zoomed image instead of the original background image?
Last reply by boops boops, -
-
-
- Leaders
- 3 replies
- 4.7k views
After browsing the web and reading dozens of examples and tutorials I still can't figure out how to translate mouse X;Y screen position in pixels to X;Y isometric tile index. All the examples I tried returned strange values. The attached picture shows exactly the tiles' redering order. The Zig-Zag rendering mode was so simple to implement with the help of a colored coded tile. But this diamond shapped design is really giving me a hard time. I guess the formula involves the following variables: - MousePos.X - MousePos.Y - TileWidth - TileHeight - ScreenWidth - ScreenHeight Now I just need to know how to put the pieces together. Unfortunately, I fail to se…
Last reply by EFileTahi-A, -
-
- 1 reply
- 7k views
I have 1 image and i draw some lines on the image. i want to insert this picture with the lines to SQL..how i can combine 2 different object become one, and insert to SQL??
Last reply by mandelbrot, -
-
- Leaders
- 1 reply
- 3k views
Re: Extract icons from icl files RE: http://www.xtremedotnettalk.com/showthread.php?t=90949 The code works perfectly, but can I ask you another code for extracting a single icon on the ICL File with all the color depth, for example in ICL File there 10 Icons from 0-9, I want to extract Icon number 0 into a single ICo file. Thanks.
Last reply by snarfblam, -
-
- 1 reply
- 2.2k views
Maybe it is just a brain fart, however the highlighted line of my code produces and index out of range error... can anyone spot the problem? public void AddParticle() { Array.Resize(ref Particlestemp, Particlestemp.Length); Array.Copy(Particles, Particlestemp, Particles.Length); Array.Resize(ref Particles, Particles.Length); Array.Copy(Particlestemp, Particles, Particles.Length); Array.Resize(ref ParticleMeshtemp, ParticleMesh.Length); Array.Copy(ParticleMesh, ParticleMeshtemp,ParticleMesh.Length); Array.Resize(ref ParticleMesh, ParticleMesh.Length); [color="Red"]ParticleMesh[ParticleMesh.Length-1] = Mesh.Sphere(device, 4, 64, 64 );[/color] Part…
Last reply by SleepingTroll, -
-
- Leaders
- 2 replies
- 3.6k views
Im trying to create a pixel search function, but i keep getting memory leaks and i cant figure out why. I fixed 1 put another popped up. Was wondering what im doing wrong. } public Bitmap capturescreen(Rectangle rect) { Size sz = Screen.PrimaryScreen.Bounds.Size; IntPtr hDesk = GetDesktopWindow(); IntPtr hSrce = GetWindowDC(hDesk); IntPtr hDest = CreateCompatibleDC(hSrce); IntPtr hBmp = CreateCompatibleBitmap(hSrce, sz.Width, sz.Height); IntPtr hOldBmp = SelectObject(hDest, hBmp); bool b = BitBlt(hDest, 0, 0, rect.Width, rect.Height, hSrce, 0, 0, CopyPixelOperation.Source…
Last reply by snarfblam, -
-
-
- *Gurus*
- *Experts*
- 16 replies
- 17.8k views
I am attempting to put in a print screen option in my vb.net program. I did some reading in the help and it says that the PrintForm function is no longer in vb.net and it suggests using a third party program to do the same functionality. The problem is that multiple users will be using this program. I don't want to have to find some third party program and then install it on every PC that needs to run the prog. Is there anyway to do something similar to PrintForm in vb.net? or Does Windows come with something that I could use and automate this procedure without using a third party program? Thanks for the help! shootsnlad
Last reply by ralphwadsworth, -
-
- 2 replies
- 4.2k views
I'm starting out with learning C# and GDI+; and was trying to come up with ways of implementing mouseclick movement for a game. The method I came up with is below. Would welcome any suggestions for making it better. Relevant code:--- using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace clickmoveproject { public partial class Form1 : Form { Bitmap backup; Graphics gfx, fgfx; PointF charloc; private bool mclick; float spe…
Last reply by heater19, -
-
- Leaders
- 6 replies
- 3.7k views
When I draw an image the color is not the same as the original. Is there any way to fix that? e.Graphics.DrawImage(Im, rect);
Last reply by JibstaMan, -
-
-
- Leaders
- 2 replies
- 4.7k views
I would like to implement a 3D sphere to play an animated rotating planet for my game but using GDI+ ONLY. Since my math skills are next to zero, I definitely need to see an example. The problem is that I can't find any on the web. Is this too hard to be done with a texture? What about a an opaque wireframe version divided with vertical and horizontal circular lines?
Last reply by EFileTahi-A, -
-
- 7 replies
- 15.3k views
I have been looking for a way to create rounded corner buttons for a windows forms app in vb.net and have been mostly unsuccessful to this point. I can draw a rounded corner rectangle within the client area of the button, but the client area is still a rectangle and I can't figure out either how to make the rectangle client area transparent or make the whole button a different shape. I have been working in the onpaint side of the button control. Will this not do all that I need? Do I need to be looking at something other than the button control itself. I'm not really sure where to go from here. Thanks
Last reply by PrOpHeT, -
-
- Leaders
- 4 replies
- 3.2k views
I'm new here, and I'm kinda new to programming as well. I wrote a euchre program as a command line program, and I am converting it to a Windows program. For those who don't know, euchre is a card game involving 3-7 players (most commonly 4) which is most commonly played in the NE US. (http://en.wikipedia.org/wiki/Euchre) A little background on me - This is my first Windows program, and I am learning as I go. I learned C++ in college, and was only taught command-line programming. I originally wrote this program in C++ as a command-line program, and I converted it to C# for the GUI version. I learned the differences from C++ to C# through an eBook that I found, and from…
Last reply by havens1515, -
-
-
- Administrators
- 1 reply
- 5.1k views
Hi, i need some desparate help using "avifil32.dll" in VB.net I'm probly just a terrible coder ... as an example I've attached a basic program that takes a picturebox and turns it into an AVI. The problem i have is i cant seem to figure out how to compress the AVI during output, it grows to 400mb in about 10 seconds, and i need to run the program for hours. Any help would be appreciated -Thanks Bmp to Avi.zip
Last reply by PlausiblyDamp, -
-
-
- Leaders
- Administrators
- 5 replies
- 4.7k views
I have a file, "multi.ico" which has four images of different sizes (16x16, 24x24, 32x32, 48x48). Each sized image is a different color, to make it easy to tell which size we are dealing with. This file has been inserted into a resource file "Multi.resources" using Lutz Roeder's .NET Resourcer. I need to be able to extract the ico from the .resource file in such a way as to keep all four sizes of images. Ideally, I would like to have a wrapper class around the .ico object which allows selection of the image of the proper size. I have a working wrapper that I can use with a standalone .ico file (multi.ico), but my company system has a lot of images, and we need to…
Last reply by PlausiblyDamp, -
-
- 1 reply
- 6.3k views
I want to give my form an alpha-blended drop shadow. How would i go about doing this? Thanks
Last reply by shadmehr, -
- 0 replies
- 2.6k views
I've got a bad version of this algorithm working, bad because my graphic object which i'm trying to move to where i clicked the mouse, still doesn't move in a straight line to the final x,y position I realise i could do this easier with XNA and vectors, but i'm just obsessed at this point since people have been doing this sort of movement in games for over 15 years (Diablo, Baldurs Gate, Age of Empires, blah, blah, blah...) It's just a straight on movement, so i don't need any sort of pathfinding(A* or something like that) here is the relevant code, I know I'm losing precision when I update the playerShip position, which is the cause of the problem, but how to fi…
Last reply by heater19, -
- 0 replies
- 2.8k views
I'm currently using GDI+ for my application. GDI+ Is so easy to use! Too bad its performance is not even moderately as good as its simplicity... I need a solution to draw images, rectangles and text fast and clean, but it must also be cross-plattaform, I believe this leaves me only with OpenGL. I know that there are a few OpenGL wrappers for .NET but I don't know about their performance and simplicity. Does anyone know about one that is easy to use and fast enough to be used in 2D ONLY?! Thank you!
Last reply by EFileTahi-A, -
- 1 reply
- 7.7k views
Seems Like I haven't been on this site in quite a while. I am using VB 2010 full version. As the title says. I having problems getting print preview to display the proper view in landscape mode. It stubbornly shows portrait. I am using the PrintPreview control in the hopes I can change printer setup information on the fly while in preview mode. Before I call a dialog containing the printpreview control I am setting PrintDocument.PrintSettings.DefaultPageSettings.Landscape = True Thus far I have less hair and no answers.
Last reply by Gruff,
-
Who's Online 0 Members, 0 Anonymous, 14 Guests (See full list)
- There are no registered users currently online