all groups > dotnet drawing api > march 2006
Filter by week: 1 2 3 4 5
Response.OutputStream filename
Posted by Liming at 3/31/2006 8:20:09 PM
Hi all,
I have a Bitmap that I'm ready to stream back to my aspx page. I
implemented this in a HTTPHandler.
The issue is the default image name is gerneated using the HttpHandler
name.
How should I use Bitmap.Save() method that takes a
Resoponse.OutputStream and specifiy a file name at t... more >>
Rotate a Line
Posted by fg005zt NO[at]SPAM gmail.com at 3/30/2006 2:48:09 PM
Below is what I was doing similiar to rotating an Ellipse, but I also
want to rotate a line in a user control and dont quite understand how
to do this?
Jason
//Create pen.
Pen blackPen = new Pen(Color.Black, 3);
//Graphics path
GraphicsPath graphPath = new GraphicsPath();
// ... more >>
Subscrat PointF error...
Posted by John at 3/30/2006 4:46:20 AM
Why this code fails and what is the solution ?
PointF pntA,
PointF pntB
PointF center
pntA = pntA - center;
pntB = pntB - center;
The error is that i cannot use the '-' operand between pointF.
How to do that ?
Thanks
... more >>
Experiencing problems with Bob Powell's approach
Posted by Asfar at 3/29/2006 5:07:34 PM
Hi
I am using Bob Powell's approach for converting images to
Format1bppIndexed.
This process is taking more then 2 minutes for 7kb image. The final image
thats created is right but the process takes very long.
Can someone tell me if the conversion really takes that long or if I am
do... more >>
Using GDI+ to manipulate and save tiff image
Posted by Asfar at 3/29/2006 10:16:52 AM
I am using GDI+ to load a tiff image and write a string to it and save the
tiff image to another file.
I can save the image with only LZW Compression and not abel to save with
CCITT4 compression. If I use CCITT4 compression I get an invalid paramter
error when saving file.
The file saved... more >>
hardware acceleration
Posted by Keith Langer at 3/29/2006 7:56:55 AM
Okay, it seems apparent to me that GDI+ does not use any hardware
acceleration (despite Microsoft's original intentions). So the
question is, how do I get graphics acceleration in my .Net application?
Does the use of BitBlt guarantee acceleration? Can someone tell me
what API calls will get a... more >>
How can I enumerate EMF file records without override OnPaint method
Posted by eliot.shao NO[at]SPAM gmail.com at 3/29/2006 6:17:58 AM
I saw in MSDN EnumerateMetafile is called in OnPaint method of a Form
control.
How to make the following code works? Can anyone help?
Graphics g = this.CreateGraphics();
Graphics.EnumerateMetafileProc metafileDelegate =
new Graphics.EnumerateMetafileProc(MetafileCallback);
... more >>
problem to create web control using graphics
Posted by rushikesh.joshi NO[at]SPAM gmail.com at 3/29/2006 6:02:31 AM
Hi All,
I want some charting functionality in my ASP.NET application.
I want to show a multiple bar on my web page. It's based on down time
of different servers.
like
server1: down betn 4 AM to 5 AM and 6 PM to 7 PM
server2: down betn 7 AM to 7:30 AM
server3: down betn 3 AM to 5 AM and 2 ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
GDI+ saved images
Posted by Curtis at 3/27/2006 10:13:28 AM
I am saving off 1 bit depth 150X150 dpi images and trying to view them with
Imagemagick. The problem is some of the images are inverted meaning the
black shows as white and the white shows as black. Anyone have any idea why
this would occur?
Thanks,
Curtis
... more >>
Scale and New Controls
Posted by theinvisibleGhost at 3/27/2006 7:44:15 AM
I've used the Scale Method to implement a zoomable interface
which is working really nicely.
However when new controls are added to the interface they go to their
default size, creating some weird effects.
Before I start adding complex operations to remember what scale they
should be
added a... more >>
GDI+ question
Posted by ZQ at 3/24/2006 2:57:03 PM
Hi everyone!
I have a question about GDI+. I hope this is the right group for it.
I'm building a control in C#.
This is approximately what is bothering me. My control has something
like this:
float deltaY = 0;
// the onPaint handler of my control
protected override void OnPaint(PaintEve... more >>
DrawString doesn't work with MeasureString?
Posted by gjenglish at 3/24/2006 11:09:25 AM
I am attempting to render text onto a Bitmap by using GDI+ (.net 2.0)
MeasureString/DrawString methods. Depending on the text length and
Font object (i.e. Font Family and Font Size), DrawString won't draw the
string based on the size that MeasureString returns. It appears that
MeasureString do... more >>
converting from one bitmap format to another
Posted by mccorb at 3/24/2006 10:23:51 AM
If I have a Bitmap with a 24bpp format that I have loaded (or any
pixleformat for that matter) and want to convert it to a 1bpp Bitmap is
there some way to to do this besides iterating thru the bitmap data myself
pixel by pixel? I realize that any method supplied will "estimate" whether
the ... more >>
Looking for a dot net chart library.
Posted by Amit at 3/24/2006 8:13:01 AM
Hi all.
I hope I’m asking my question in the right place (please direct me to a
better place if you know of one).
I’m looking for a dot net chart library. My short list contains Dundas and
Essential Chart (by SyncFusion) – Have I missed something?
I’d appreciate any comments re... more >>
CopyPixelOperation - How can I use SourceCopy and CaptureBlt
Posted by Thomas Thomassen at 3/23/2006 2:20:02 PM
Hi.
I'm trying to capture the screen and manipulate in C#. I've found that
CopyFromScreen works just as BitBlt. However, apparently in order to capture
layered windows you have to pass the value of CopyPixelOperation.SourceCopy |
CopyPixelOperation.CaptureBlt. Is there any way I can do that w... more >>
Image annotation
Posted by Asfar at 3/23/2006 9:24:15 AM
Has anyone tried loading an image file in memory and annotating the image
with some text and saving the file using GDI+?
... more >>
Read Image
Posted by Tj2007_1 at 3/22/2006 3:36:27 PM
How to read Image in on same page
I have Image control and I am doing
iImage.ImageUrl("ImageRead.aspx")
I dont want to go in to othere page, is there anywan so I can directly
Read on my parent aspx page.
Like iImage(Responce.write(myBytes))?????
Thanks
... more >>
invalidating multiple rectangles
Posted by Keith at 3/22/2006 8:25:57 AM
I'm working on a transition library, and one thing that's giving me
trouble is the "blinds" effect (similar to the blinds effect in
PowerPoint). The problem is that when I invalidate multiple discrete
rectangles, Windows winds up invalidating a much larger area which
contains all of the rectang... more >>
Image size
Posted by Tj2007_1 at 3/18/2006 2:31:06 PM
I am creating aspx file to upload file.
I allow to user to upload file If that file size is less then 200KB and
after that I want to srink that file up to 50KB (1/4 of original file). And
then store in to database.
Thanks
Tj
... more >>
opacity vs. alpha
Posted by Keith at 3/18/2006 7:12:51 AM
I am working on a project which renders a series of nested text and
graphics objects on a form, much like a browser. It also displays a
series of alternating pages, and contains dynamic content such as
marquees, videos, rotating elements, and blinking elements. I'm using
double buffering on al... more >>
How can I determine the type of an image?
Posted by Colmeister at 3/16/2006 2:39:06 AM
I need to display images that are stored in a database without any meta
information such as their size or type (gif, jpeg, etc). I can create a new
Image object from the byte array returned from the database, this allows me
to determine the size easily but I can't figure out a way to find out... more >>
Determining image lighting
Posted by SStory at 3/15/2006 10:16:06 AM
I am drawing a selector on my image for cropping purposes. It is done in
black, however if the image is real dark this doesn't show up well.
How can I determine the darkness of an image, or areas of an image so that I
can know whether to use black or white?
Is there a better way?
Thanks... more >>
Error saving Bitmap
Posted by tjonsek NO[at]SPAM phenom-biz.com at 3/15/2006 7:06:45 AM
I get a generic error (not very helpful) when attempting to save a
re-sized image back to its original location. Here is the code snippet:
Dim g As System.Drawing.Image =
System.Drawing.Image.FromFile(Me.File1.Value)
Dim thisFormat = g.RawFormat
Dim imgOutput As New Bi... more >>
HOW TO DO THIS SIMPLE DRAG ?? - HELP!!
Posted by pamela fluente at 3/14/2006 6:18:21 PM
I have a PictureBox on a form. I need to drag the image exposed by the
PictureBox "image" property to a window of Windows Explorer (or to the
desktop).
The new file will have a name assigned by the programmer, for instance
"MyDraggedImage.png".
Dim TargetDirectory As String = "HowDoIG... more >>
Saving Multipage Tiff to Database - My Contribution
Posted by Jack at 3/14/2006 5:20:12 PM
Ok, I looked for a few weeks on code for saving multipage tiff images to a
database. Single page tiffs are no problem, it was the multipage that's the
killer. Anyhow, here's the resultant code taken from a few posts and
simplified. Hope it helps someone down the road.
Basically, transfor... more >>
Upload Images
Posted by Tj2007_1 at 3/14/2006 12:59:30 PM
I am creating aspx file to upload file.
I allow to user to upload file If that file size is less then 200KB and
after that I want to srink that file up to 50KB (1/4 of original file). And
then store in to database.
Thanks
Tj
... more >>
Creating a GraphicsPath control with filled rectangles and lines
Posted by octagon1964 at 3/14/2006 5:59:48 AM
Hi all,
I have a little problem with a toolbox I'm developing in C#. I want to
make a tool to create a GraphicsPath object consisting of a rectangle
with some lines in it - where the size of the rectangle as well as the
placement of the lines are determined by parameters.
I want the Rectang... more >>
Invalid parameter used Error
Posted by Sekhar at 3/13/2006 11:23:11 PM
Hi All,
I got the following error when I am trying to save a tiff file using
bitmap class
"Invalid parameter used"
faxPageImage = new Bitmap(fileName); //Error Line.
Pleaz Note: I am able to open the same file in Imaging Application. I
am getting this error only for few tiff files.
P... more >>
Printing directly to the printer
Posted by ike at 3/9/2006 6:10:29 AM
Hi,
I'm looking for a way to directly print to the printer. With directly I mean
I don't need any driver. Just add a printer on the LPT1 (without registering
it first in windows) and send data to it.
The problem for me is that I have to work with really old printers
(matrix-printers) and... more >>
Dotnet GIF creation problem
Posted by innesm NO[at]SPAM gmail.com at 3/8/2006 7:32:41 AM
Hi,
I have written some code that creates and draws into an 8bbpIndexed
bitmap using LockBitmap and direct memory access, and then saves this
as a GIF.
(bitmap pattern: The bitmap is filled with lines of different colours.
Each horizontal line is set to a colour index of one greater than the
... more >>
in theory can .NET produce smooth animations and clipping as Flash can ?
Posted by Bill Woodruff at 3/8/2006 12:00:00 AM
I have not messed around with Flash, but have been very impressed with some
ui's I've seen that move viewports around selectively exposing a hidden
picture. And I have seen animations of bitmaps that were remarkably smooth.
Even Microsoft uses Flash :
http://www.origamiproject.com/2/
Ev... more >>
User Contorl Path Points - Ellipse
Posted by jhall999 NO[at]SPAM earthlink.net at 3/7/2006 9:54:03 AM
Does anyone have an example of an Ellipse user Control that properly
expands the control container so the ellipse is NOT chopped off. It
has been mentioned to use Flatten on the Graphics path and then get the
Min/Max X and Y's but I am seeing inconsisten behavior on what that
returns?????? Cod... more >>
how to chage colors for a tabcontrol tab pages
Posted by jaffar at 3/6/2006 5:58:59 PM
hi,
I am using Tab control, i added the tab pages , i want to change the tab
pages color when ever i select the tab page,
i have tabpage1,tabpage2,tabpage3
i mean when ever i select the tab page 2 the tabpage is hilighted remaing
two are not hilighted,
i want to change the tab page ... more >>
Create 1bpp Multipage tiff image
Posted by David at 3/6/2006 2:39:39 PM
I'm having trouble making a multipage tiff image that is only 1bpp
since it will be holding fax information. When I try to alter the pixel
format I get "A Graphics object cannot be created from an image that
has an indexed pixel format."
My code looks something like this, where myCustomObject ... more >>
simple matrix question
Posted by SharpCoderMP at 3/3/2006 8:26:40 PM
imagine three rectangles:
rect0 = new Rectangle(0,125,1181,930);
rect1 = new Rectangle(0,21,198,156);
rect2 = new Rectangle(51,22,100,100);
as you can see rect1 is a smaller version of rect0.
you can also see that rect2 is somewhere inside the rect1.
can someone tell me what transformation... more >>
Mixing GDI+ and GDI in .NET application
Posted by Marcin Rzeznicki at 3/3/2006 11:10:22 AM
Hello,
Do you think it is legitimate practice to mix GDI+ and GDI calls (via
Get/ReleaseHDC()) in paint event of a control? I've heard there is
possibility of performance loss while "locking" Graphics object which
is done as a side-effect to GetHDC() call - could you confirm? Another
question t... more >>
Projective Transformation with C#
Posted by Marc Selman at 3/3/2006 4:50:39 AM
What I would like is a method that takes a Image object and 4 x/y
coordinates.
The Image should be a normal rectangle image and the 4 coordinates
should be the new locations for the corners of the original image.
So I want to transform a rectangular image into a quadrilateral.
I've seen a lot o... more >>
Why the PixelFormat changed when Rotate the image?
Posted by cuihl at 3/2/2006 10:19:00 PM
i have a Format8bppIndexed jpeg file.
i load the file to an bitmap object
then rotate the image use bitmap.RotateFlip function
then save it to a jpeg file
but the file's PixelFormat is change to Format24bppRgb?
here is the code
Bitmap img,img2;
img = (Bitmap)Image.FromFile(@"c:\test.jpg")... more >>
Bitmap drawing perfomance
Posted by SharpCoderMP at 3/2/2006 5:20:46 PM
hi,
i've crated a custom control that allows user to draw selection
rectangle over a bitmap. the selection rectangle is semi transparent and
also implements cool "Marching Ants" feature :). the marching ants are
moved by a timer set to interval of 100.
the problem is the performance hit i g... more >>
Save Tif Image with a bit depth of 1
Posted by Curtis at 3/2/2006 11:41:25 AM
I am trying to save multi-page tif images to a bit depth of 1 but they seem
to only save as a bit depth of 32. I am using the tif saving example found
on Bob Powells site. When I try to add a paramater to the image I get a
"Generic Error" from GDI+. I am trying to use the following
encoderpa... more >>
Forms 1.1 GDI+: drawing text and adding an event to it at Run Time
Posted by Philip at 3/2/2006 2:00:27 AM
Hi,
I have a Splash form with text drawn on it over a gradient color scheme.
This same form is shown as the 'About..' box
When the form is shown as the About dialog, I want to add a close button in
the top-right hand corner ... but I don't want to use a control like a label
(seems to not... more >>
problem with killing a file
Posted by jhixon NO[at]SPAM Rediffmail.com at 3/1/2006 10:09:25 PM
I read an image file from the database which is in compressed format.
I write it to the disk and then decompress it and view it in a
picturebox.
after viewing in a picturebox i want to kill the file,but this fails.
If the picturebox is not used then everything works fine.
The error i get is tha... more >>
Problem with Resizing rotated sheared rectangles
Posted by --Fragman-- at 3/1/2006 1:46:05 PM
Ok, my problem is the following:
I'm creating a kind of object oriented painting program, where you can
select every object, modify it's properties, move it, scale it, rotate
it, etc...
Naturally there are quite some matrix transformations involved in it,
but I'm still having some problems with... more >>
jpeg palette is lost after loading it as bitmap to work with GDI+ C#
Posted by Nassim at 3/1/2006 8:10:58 AM
Hi All,
Could any one help me on this please?
I'm using C# and GDI+ to create dynamic images and show them on the
web. I'm loading the main image which is a jpeg, then I'm drawing some
text and shapes on that base image using Graphics class of GDI+, at the
end I'm sending the new image to ... more >>
|