Save image with ocaml graphics
Hello, i want to save the picture generated by ocaml graphics in a file (png or jpeg). Thank you. ...
Hello, i want to save the picture generated by ocaml graphics in a file (png or jpeg). Thank you. ...
Our dev shop has a couple of programmers who have little to no graphic design experience. We are looking for a freelance graphic designer for just one project or on demand. Is there a good website that has a list of graphic designers with ASP.NET experience that I can compare/pick and choose. Thanks! ...
I'm making a full screen app that uses double buffering. The problem is a following: when I debug it and the debugger pauses the process (breakpoint hit or exception thrown), the secondary buffer may got stuck on the screen. In this case I only see the current frame and the mouse pointer and I can interact with the IDE's UI but I don't s...
Hi, I am using GWT-Graphics to create shapes like rectangle, circles etc... Now i am trying to add text to these shapes. Here is how the code looks like: DrawingArea d1 = new DrawingArea(100, 100); Ellipse e = new Ellipse(29, 20, 30, 20); Text t = new Text(10, 20, "A"); d1.add(e); d1.add(t); boundaryPanel.add(d1, 200, 40 ); But when ...
I use Graphics2D in Java to scale and rotate the picture I draw. I now want to be able to tell what the original coordinates were when I click on a certain point in the picture. So given the rotated and scaled coordinates I want to calculate the original ones. Is there a simple way to do this? ...
Hi, guys, I am developing a tool drawing primitves with DX9 in my XP-32. When create vertex buffer and index buffer, there could be some error of creation failed. Return code could be D3DERR_OUTOFVIDEOMEMORY or E_OUTOFMEMORY. I am not sure what the difference of them. I use VideoMemory tool in DX sample to check the memory, and it r...
Recently I saw demonstration of image distortion algorithm that preserves some objects in image. For example changing weight/height ratio but preserving people faces in image to look realistically. The problem is i can't find the reference to that demonstration neither I know the name of such transformations. Can anybody point me to a ...
Hello Everyone! I have an image with Gray Background and 'CUP' in center of it... I want to detect the boundaries of the cup in this image.. After detecting CUP I want to extract the CUP from the image using IMAGEMAGICK.. Note I have many images with different objects (like CUP) in the center and with different background color .. So I ...
This question is related to: How do I determine the intersection point of two lines in GDI+? (great explanation of algebra but no code) How do you detect where two line segments intersect? (accepted answer doesn't actually work) But note that an interesting sub-problem is completely glossed over in most solutions which just return nu...
Hey all, I've got some 2D geometry. I want to take some bounding rect around my geometry, and then render a smaller version of it somewhere else on the plane. Here's more or less the code I have to do scaling and translation: // source and dest are arbitrary rectangles. float scaleX = dest.width / source.width; float scaleY = dest.heigh...
I need to draw a scientific graph (for example, a line or bar graph) and then render it in my application, which uses OpenGL for all display-related purposes. What is the best way to do this? Does anyone know of a plotting library for OpenGL? I haven't been able to find one, and the best thing I've come up with so far is to use LibGD...
import wx class TestDraw(wx.Panel): def __init__(self,parent=None,id=-1): wx.Panel.__init__(self,parent,id) self.SetBackgroundColour("#FFFFFF") self.Bind(wx.EVT_PAINT,self.onPaint) def onPaint(self, event): event.Skip() dc=wx.PaintDC(self) dc.BeginDrawing() width=dc.GetS...
iam trying my hand at using the crystal space api in my graphics applications. crystal space website The applications compile fine but iam having hell with the dlls(dynamic link libraries). The compiled application crashes at run time and i suspect its because of not finding the needed dlls. The only solution i currently have is cuttin...
Hello! I've subclassed the UIButton class and now a custom view will be drawn using quartz 2d. It all looks fine, but how can I darken the button at clicking it. How can I set the views for the different states if I am using quartz in the same class to draw the button? Thanks for your help ...
What's mean this expression in algorithm? p = ((p<<1)&0666) | ((q<<3)&0110) | (Image->scanLine(y+1)[x+1] != 0); Algorithm "Binary Image Thinning Using Neigborhood Maps" in a book "Graphics Gems IV": static int masks[] = {0200, 0002, 0040, 0010}; uchar delete_[512] = { 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,1,0,0,1,1, ...
I've been working on some custom graphics controls, and I found this weird problem with windows 7 rendering my button controls. I've used Photoshop to delete the pixels in the background all around the button image I'm using, then saved it as a GIF, and imported it into VS to use as the background image of my button. When windows XP re...
When we develop web pages we can broadly work out which browsers to support based on market share. When we develop in .NET we can broadly work out which .NET version to develop for based on which Windows versions have it installed. But when developing OpenGL or Direct3D applications, how do we know which video cards people (I mean "peo...
this creates streaks instead of dots. why ? I am trying to paint individual pixels. another method was also tried (using fillrectangle) , which also didn't give the desired result, got bars instead of dots. protected override void OnPaint(PaintEventArgs pea ) { Graphics g = pea.Graphics ; for ( int y = 1 ; y <= W...
Hi, I'm using OpenGL to grab the contents of the Mac OSX screen - thsi works very well, except it does not grab the mouse cursor graphic. I need to somewhow get that cursor graphic, either as part of my screen capture routine, or separately. My question is either: How can I ensure that the mouse cursor image is included with the Open...
Heya, I'd like to ask what is the best way to achieve the following coding with cocoa for IPhone. As a learning exercise I'd like to make a very simple mp3 player. The part I'm most interested in at the moment is the custom visual components for this player. In particular how would I make a custom play pause button with mouseover and ...