all groups > dotnet drawing api > march 2005
Filter by week: 1 2 3 4 5
Print to client printer from web application
Posted by Patsy at 3/31/2005 8:45:02 PM
Hi
I'm trying to send an image file on the server to print from client default
printer. I see that System.Drawing.Printing has a PrintDocument control. Can
this control be used to attain my purpose? Or is there an alternative to
achieve my aim?
--
Regards Patsy... more >>
Capturing a frame using the Windows Media Player control
Posted by FinallyInSeattle at 3/31/2005 2:22:52 PM
I'm using a Windows Media Player control in a Windows Form. I've been
able to capture the currently displayed frame by using a BitBlt
operation.
What I'm looking to do now is to set the uiMode to Full so that I get
the WMP's buttons and sliders to appear. If stretchToFit is set to
false, th... more >>
Generic error in GDI+ when trying to preview more than 200000 line
Posted by DavisLG at 3/31/2005 1:45:06 PM
With the code below, I get either a generic error in GDI+ or an out of memory
error when trying to preview a report, using the .NET PrintDocument. This
error usually shows up around page 4913 at roughly 275,000 lines or so. I'm
attempting to print 58 lines per page. When printing (to a pdf p... more >>
bitmap in PixelFormat32bppARGB
Posted by Owen at 3/31/2005 12:28:11 PM
hello:
I have a bitmap saved in photoshop with 32 bit and alpha information but
when load the bitmap with Bitmap class the result of PixelFormat function
always return PixelFormat32bppRGB instead PixelFormat32bppARGB, why this
happend and who can I get the alpha informatio of this bitmap to dr... more >>
Add GraphicsPath to GraphicsPath
Posted by Peder Y at 3/31/2005 3:43:35 AM
Is it possible to add a GraphicsPath to an existing GraphicsPath?
I have several lines Widen()'ed by different pens. I want to add them
all to the same GraphicsPath.
Or do I have to store an inidividual GraphicsPath for every line segment
I create? I fear this might take up a lot of resour... more >>
How can I do Window Forms of Windows Media Player standerd?
Posted by glich via DotNetMonster.com at 3/30/2005 6:27:21 PM
I liked the look of the Window Media Player form. I have no idea on how to
begin to create forms like that, though I have done basic forms. Could you
give me a web site on this topic?
thx!
--
Message posted via http://www.dotnetmonster.com... more >>
combining multi-tiffs into one image for the web
Posted by Whit Pitcher via .NET 247 at 3/30/2005 8:19:41 AM
How do i extract all images from a multi-tiff image object and=
combine them into one image object using ASP=2ENet? The target=
object would be a normal or non-multi-tiff image at this point=2E =
My code works to the point of getting the tiff from a database,=
looping through and pulling ou... more >>
Invalid parameter used when using CompressionCCITT4
Posted by Edward at 3/30/2005 4:19:03 AM
Hi,
Compressing a tiff-image from file using the following code is working fine:
ImageCodecInfo myCodecInfo = GetCodecInfo("image/tiff");
Bitmap objImage = new Bitmap(drRow[FieldName].ToString().Trim());
EncoderParameters CodecParams = new EncoderParameters(1);
CodecParams .Param[0] =
n... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
2 Newbie Questions
Posted by damiensawyer NO[at]SPAM yahoo.com.au at 3/29/2005 11:03:39 PM
Hi, I'm trying to draw a border around my form that redraws on form
resize.
Can someone please tell me
1/ How do I find the 'internal' dimensions of the form? I wish to draw
it around the usable area of the form. The rectangle below is not
centred.
2/ How do I repaint the form on resize t... more >>
Saving in Vector Format (.EMF)
Posted by John Buchmann at 3/29/2005 4:17:58 AM
Can anyone give me a hint how I can save a drawing as an
EMF (Vector) file. The following simple example gives an
error. If I create the drawing tru a Bitmap object then it
saves the file but as a rasterized image (not vector). Any
help is appreciated:
Dim g As Graphics
Di... more >>
Bug in GDI whit Zoom and Antialias
Posted by Davide Rocchelli [ITA] at 3/29/2005 12:07:01 AM
I have found a probable bug when you draw with GDI.
Look this simple code
'***************************
Private WithEvents tmr As Timer
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Const Zoom As Sing... more >>
printing win form controls at the printer
Posted by David Kowalsky via DotNetMonster.com at 3/28/2005 8:16:07 PM
hi all,
i need to print a picture box where i actually draw my own picture. That
would be a combination of a few strings and a few lines.
I can print the picture box at the printer, however, any graphics inside
the picture box would not show up. I kinda undrestand now why this is
happening ..... more >>
Graphics.FromHwnd(_pictureBox.Handle)
Posted by John Bailo at 3/26/2005 8:20:11 PM
I am walking through some of the very first sample code from the book
"Beginning .NET Game Programming" from Apress. I identify his sample
code with //SC
This code puzzles me:
Graphics graph = new Graphics //SC
// first of all there is no constructor for Graphics
// so in the Form_P... more >>
DrawImageUnscaled() or FillRectagle() + DrawRectangle() - Which is faster?
Posted by Phil Price at 3/26/2005 10:38:52 AM
Hi,
I'm currently developing a set of custom controls for a client.
Everything is themeable, yadda yadda. I have my own
"PictureLargePreview" control which accepts a bunch of Pictures (a
threaded extension on top of munch of bitmaps for preview etc). And will
display them in a list. With ... more >>
VB.NET for Pocket PC
Posted by abc xyz via DotNetMonster.com at 3/25/2005 9:41:58 AM
Does ne one know howto mark a point on an image placed in the picture
box.In VB6.0 Pset porperty does this.Ne alternative for this in VB.net?
--
Message posted via http://www.dotnetmonster.com... more >>
Whats the difference between DrawIcon and DrawImage
Posted by Rachel Suddeth at 3/24/2005 3:32:09 PM
I have some code that draws small images which really are icons onto menu
items. After doing this with DrawImage, I found the Graphics.DrawIcon
method. Is there an advantage to this DrawIcon that would make it worth
changing my code, since drawing icons is really what I'm doing?
-Rachel
... more >>
Spherical texture mapping
Posted by Peder Y at 3/23/2005 8:04:55 PM
Before I dive headfirst into this one, I'd like to hear some oppinions:
I have a list of images, displayed in a ListBox. The images are quite
small, say 100*100 px tops.
Now, I want to create a MouseOver effect where the image that is hovered
over is displayed as through a magnifying glass... more >>
Pen Alignment.
Posted by Shawn at 3/23/2005 3:25:09 PM
I am trying to create a bar code in a vb.net app, but the pen alignment
right does not have any effect. Any ideas?
... more >>
drawing a triangle on a toolbarbutton
Posted by lottoman at 3/23/2005 12:06:17 PM
I am trying to draw a triangle on a toolbarbutton to simulate a drop
down button without having the extra button beside my drop downbutton.
I was successfully able to draw the triangle by overrriding the onpaint
event for the form. that only problem is when I click on the button ( a
context menu... more >>
"Colourizing"
Posted by Nick at 3/23/2005 10:37:13 AM
Hi there,
I'm using colour matrices to attempt to colourize a bitmap. I would
like to try to make any bitmap the same "hue" so to speak as the system's
button face colour. This way I can match the colour scheme automatically.
I was thinking that I might need to transform the imag... more >>
Grayscale
Posted by Todd Acheson at 3/23/2005 10:34:26 AM
Is there a technical definition for the term grayscale?
Would an indexed image (1,2,4,8 or 16bpp) be considered grayscale if all the
colors in the pallete are true shades of gray? Could a 24bpp image be
considered grayscale?
We're trying to print some TIFF images with a high speed printing ve... more >>
Merging two images
Posted by Dave at 3/23/2005 5:22:09 AM
Hi all,
I am having a little difficulty...
I am trying to merge two images togethor, but I am
getting "Invalid parameter used".
I have created a seperate class file, set up properties
and a method.
I am calling it from aspx, the calling works OK, but the
return just doesn't work.
... more >>
Colour difference between CreateGraphics() and OnPaint?
Posted by Peter Kenyon at 3/23/2005 12:00:00 AM
Hi,
I have a control which, among other things, draws a solid rectangle using
FillRectangle(). The brush used to fill is a SolidBrush created from
KnownColor.Control. When this code executes using a Graphics created by
CreateGraphics, the rectangle is exactly the same colour as the backgrou... more >>
How to get DPI of screen?
Posted by Lei Jiang at 3/22/2005 11:33:35 PM
It seems there is something like Screen.Dpi property? But I could not found
one. Is there an easy way to get the DPI?
Thanks!
... more >>
A printer's paper-size in pixels?
Posted by Olaf Rabbachin at 3/22/2005 6:21:19 PM
Hi folks,
when printing images, I'd like to extract a user-selection and paint
several copies (i.e. passport-photos) onto a single page.
Thus I'm creating a new bitmap and paint the "view port" on it as many
times as appropriate.
But - in order to center and scale the "items" accordingly I'd ... more >>
Resize TIFF image
Posted by Anthony at 3/22/2005 9:00:29 AM
I am attempting to write a program that will take many 1BPP Group 4 CCITT
images and downres them from 36"x24" at 400 DPI to 36"x24" at 200DPI. I got
as far as to create the new bitmap object and then when I tried to convert
it into a graphics object (graphics.fromimage()), I got an error "A Grap... more >>
Encoder.Transformation
Posted by Andrew Robinson at 3/21/2005 11:05:32 AM
The following works fine:
EncoderParameters encoderParameters = new EncoderParameters(1);
encoderParameters.Param[0] = new EncoderParameter(Encoder.Quality, 100L);
image.Save(httpContext.Response.OutputStream, GetEncoder(contentMime),
encoderParameters);
This does not:
EncoderParameters ... more >>
Difference between OnPaintBackground and OnPaint
Posted by Pino at 3/21/2005 8:40:43 AM
What is the difference between implementing OnPaintBackground method instead
of OnPaint method in a form?
I use the first method to draw only the background image of my Windows Form
and OnPaint to draw standard graphics on the form surface (lines, other
images, texts).
I'm looking for th... more >>
Convert color bitmap to black and white
Posted by Z at 3/20/2005 9:59:02 PM
Hi,
How can I convert a color bitmap into black&white one.
I tried this:
Bitmap b=(Bitmap)Bitmap.FromFile(dlg.FileName,false);
Bitmap bw=b.Clone(new
Rectangle(0,0,b.Width,b.Height),PixelFormat.Format1bppIndexed);
but and "Out of memory exception" is thrown. Note that if I change the pix... more >>
TabControl - OnPaint Problems
Posted by Jeff Jarrell at 3/20/2005 12:49:25 PM
I am trying to build an inherited tabcontrol in vb.net that among other
things, rounds off the rectangles for the tabs, makes them slighly taller
and wider, and puts a little space between each tab.
I am using
SetStyle(ControlStyles.AllPaintingInWmPaint Or
ControlStyles.ResizeRedraw Or... more >>
Synchronized Scrolling of images
Posted by wurst.michael NO[at]SPAM web.de at 3/20/2005 8:13:17 AM
Hi developers,
I need to synchronize the moving/scrolling of 4 images in a window. So
I started to write my own image control that inherits from the panel
object. I overrid the WndProc to capture the Scroll messages and
create a new delegate:
protected override void WndProc(ref Message m)... more >>
Draw on the form using bitmap or jpeg
Posted by Pino at 3/19/2005 9:24:51 AM
If I draw on the form using OnPaint and GDI+ methods, what is the faster
format to use for drawing images? Bitmap or jpeg?
Thanks in advance,
Pino.
... more >>
DrawImage results smaller than expected
Posted by Rachel Suddeth at 3/18/2005 3:43:20 PM
Was trying to draw an image using "best fit" code right off of Bob Powell's
FAQ. The aspect ratio of the panel was pretty close to that of the image, so
the image should have filled most of the panel, but instead was entirely
drawn within the top left quarter of the panel. Something similar has
... more >>
Custom Close,Min,Max Buttons GDI+
Posted by blesh at 3/18/2005 11:38:33 AM
Hi, I was recently trying to create my own fully custom form, and I was
hoping I could either remove and add my own close/min/max buttons, or
redraw the close/min/max buttons that are the defaults in
System.Windows.Forms.Form. Any helpful hints?
Thank you,
Ben
... more >>
regarding graphics object
Posted by Sanjay at 3/18/2005 10:40:11 AM
hi,
In my application I want the user to be able to draw a Line or Rectangle by
selecting an item from the
toolbar. And so , Obviously I have to write the code in the
mouseDown,MouseMove Event of the
pictureBox.
Could anybody please suggest me where will I get the graphics object here as
... more >>
Grayscaling of Image
Posted by susie_richie_30 NO[at]SPAM yahoo.com.au at 3/18/2005 8:45:17 AM
Hi,
I am trying to apply gray scaling to color as well as black/white
images.
I have tried using the pixel by pixel approach to achieve the
scaling. But the particular approach has a issue with high mega pixel
images.
Is there any other approach that can be applied to achieve the ... more >>
Graphics.DrawString not equal to GraphicsPath.AddString
Posted by Davide Rocchelli [ITA] at 3/17/2005 12:03:04 AM
Why this two method with same data generate different fonts ?
Graphics.DrawString generate a correct font, but
Drawing2D.GraphicsPath.AddString generate a terrible font (specially if font
is small).
Code example
Private Sub Form_Paint(ByVal sender As Object, ByVal e As
System.Wind... more >>
DrawReversibleLine() & PointToScreen()
Posted by billy at 3/16/2005 11:19:45 PM
Hi all,
I have a ruler control that is a PictureBox inside of a UserControl
which I use for scrolling the ruler. Originally, this code was
developed as a bitmap inside of a UserControl (no scrolling). Each time
the mouse was moved, the bitmap would be repainted along with the
little tracker l... more >>
PrintDocument to a in memory Grapics object, How to?
Posted by - at 3/16/2005 4:32:39 PM
Hi to All,
I have a working printdocument, how can I use it to
draw it's contents (pages) only to a inmemory graphics object
and not to a printer or printpreview?
thx for answers.
... more >>
Image-Properties?
Posted by Olaf Rabbachin at 3/16/2005 2:24:46 PM
Hi folks,
I'd like to display a loaded image's properties (i.e. resolution, date when
the picture was taken, camera that was used, etc.) using VB.Net.
Any pointers as to how to get them?
TIA & cheers,
Olaf... more >>
Convert .bmp to .tif (compressionCCITT4) renders negative image
Posted by Andrew Carlson at 3/16/2005 2:11:02 PM
Hello. I am scanning some old oversized legal documents.(24x32 in) The
requirement is to go into Ultima TitleSearch. This software only supports
Group4 tif files. To get the best quality image possible we are scanning in
8-bit color on a blueprint scanner. Next we automate a batch in Photoshop... more >>
Rotating bitmap
Posted by Rachel Suddeth at 3/16/2005 12:56:07 PM
I am so frustrated... I've gone over & over the calculations (which are
simple) for the parameters, and tried a couple different ways to do this,
but always my result seems to be distorted. Can I really have messed up
these 10th grade calculations? Or is there something fundamental I'm missing
a... more >>
Bitmap scaling
Posted by Roman Gavrilov via .NET 247 at 3/16/2005 7:54:46 AM
I have a bitmap that I want to display on a form.
When I use: <graphics>.DrawImage(bmp, new Rectangle(10, 10, bmp.Width, bmp.Height)) - everything works as expected.
But if I use:
DrawImage(bmp, new Rectangle(10, 10, bmp.Width * 10, bmp.Height * 10))
the width of first column on the image is ha... more >>
semi-transparent line
Posted by NL at 3/15/2005 11:47:00 AM
Hi,
What's the simplest way to draw a semi-transparent (alpha blended) line?
I can draw alpha-blended images using the ImageAttributes parameter of the
DrawImage method, but the drawline method doesn't have an overload with an
IA parameter.
Thanks,
Norvin
... more >>
DrawLine Limitation?
Posted by Yos Nugroho via .NET 247 at 3/14/2005 10:27:07 PM
Hi,
Recently I stummbled on an unexpected, weird behavior of Graphics.DrawLine method.
This is an example code :
Bitmap bmp = new Bitmap(100, 100);
Graphics g = Graphics.FromImage(bmp);
Point p1 = new Point(int.MaxValue, 0);
Point p2 = new Point(0, 0);
g.DrawLine(Pens.Black, p1, p2);
g.... more >>
bitmap.RawFormat problem
Posted by Trapulo at 3/14/2005 1:14:02 PM
I've a byte array containing a gif. I need a test to be sure the image is a
gif and not a jpg or other format. I try to check this via bitmap.rawformat
property, but I cannot.
This is my code:
Dim stream As New System.IO.MemoryStream(bytesImage)
Dim image As New System.Drawing.Bitmap(Draw... more >>
Save GDI+ drawing from picturebox control
Posted by Sam at 3/14/2005 1:08:47 AM
Hi guys
I'm trying to save my drawing (lines and rectangles)on a picture box as an
bmp file but I got an error which complains something "Object reference not
set to an instance of an object" How do I initiate an instance of my object
outside my paint event? Could anyone give me some sugges... more >>
Copy one Bitmap to another in C#
Posted by David at 3/13/2005 9:45:28 PM
Well, I found that by creating a Bitmap from a file using
the constructor it places a lock on the file. How do I
get around this as mentioned in
http://support.microsoft.com/?id=814675?
I have an indexed image source. I couldn't find any
solution to do this. It's very obscure. I would... more >>
Can I use an Array of Points to define an Image "Hostspot"
Posted by Troy Jerkins at 3/12/2005 2:48:53 PM
Platform VS.NET 2003, ASP.NET, VB.NET
I have quite a few (159) array of points in my code behind that define and
draw county boundries of a State Map using the drawpolygon method. I have 2
arrays listed below to provide an example.
My idea is to have the regions dynamically change color based on... more >>
Trim
Posted by Páll Ólafsson at 3/12/2005 11:37:48 AM
Hi again..
And how can I Trim a rect object?
Regards
Palli
... more >>
|