all groups > dotnet drawing api > september 2004
Filter by week: 1 2 3 4 5
gdi+: bitmap.save keeps crashing - HELP!
Posted by Sam Jost at 9/30/2004 9:45:44 PM
I've got a problem with the Bitmap.Save() method: it keeps crashing on some
pictures.
Some pictures just work, others just crash. And it is very often, roundabout
ever third picture crashes on Save after some operation.
Take for example the picture
http://home.foni.net/~sjost/fremd/IMGP5753... more >>
Load Traga images (.TGA) in VB.NET
Posted by Perlom at 9/30/2004 4:04:07 PM
The Bitmap object supports loading .bmp, .tiff. jpg ...etc files.. But it
doesn't supports Targa images (.TGA). Any body has an idea how to do that in
VB.NET?
Thanx
... more >>
Converting Text to Default Colors in VB.NET
Posted by Terry at 9/30/2004 11:35:09 AM
I have an XML file that has settings for my app. Many of the settings
involve color (i.e. <BackColor>Red</BackColor>). The XML value is read into
a string, so I have a string called strBackColor with the value "Red". Now I
want to set the form to BackColor.Red. How do I do this without hav... more >>
StringFormatFlagsNoFitBlackBox and StringFormatFlags.FitBlackBox documented as opposites, yet have the same value
Posted by Frank Hileman at 9/28/2004 9:21:44 AM
StringFormatFlagsNoFitBlackBox and StringFormatFlags.FitBlackBox are both
set to the value 4, yet according to MSDN documentation, each is defined to
be the opposite of the other. Looking at the .NET StringFormat class in
reflector I see no conversion of StringFormatFlags coming from GDI+ or vice... more >>
RectTracker Library to Buy
Posted by Jason Ho at 9/27/2004 10:25:30 PM
Any 3rd party RectTracker library to buy in Internet? I already know Bob
Powell's one.
I would like to have a control that allow user to select a area of an image
freely and do cropping.
Thanks,
Jason
... more >>
Multi-layer drawing
Posted by Sam at 9/27/2004 1:00:51 PM
Hi everyone
Does anyone know if .net supports multi-layer drawing? I need to draw
different shapes (or remove them) on different layers
Thanks
Sam
... more >>
GetThumbnailImage increases file size
Posted by Donald at 9/27/2004 12:09:05 PM
I'm developing a web service that receives an image file. Once I receive
that file I have to resize it and save it on the web server. This is all
working just fine with one exception - the new resized image file is larger
than the original file. For example my original file would be a bitma... more >>
GetHardMargins Actual Height Paper
Posted by JZ at 9/27/2004 10:20:45 AM
Hi,
I've found the GetHardMargins code written by Ron Allen.
I have it working...
But I've not exactly sure what to do with it.
I simple want to paint a drawing over 2 pages.
The 2 bits of paper would then be trimmed and stuck together with tape.
I think the easiest thing for me to do ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Cropped thumbnails?
Posted by david at 9/26/2004 5:53:05 PM
Hi,
I am somewhat new to the .net framework, and I need to create thumbnails for
an asp.net app that are 140x100 regardless of the source file's aspect ratio.
To deal with the difference in aspect ratios, the thumbnails should use the
largest center rectangle they can.
Any ideas?
Tha... more >>
GDI+ drawstring and unicode chars
Posted by shit.faced NO[at]SPAM optusnet.com.au at 9/25/2004 9:53:34 AM
G'Day,
Im writing a small card-game app. To this end I made a routine to
render the playing cards using GDI+. Now most fonts come with the
Clubs Spades Heats and Dimonds symbles included. Using Char map I
found U+2665 U+2666 U+2663 U+2660 in the arial font.
So I try to draw these chars in w... more >>
ImageCodecInfo - can't use in VS C++
Posted by AlexG at 9/25/2004 3:37:03 AM
VS 2003 Pro C++ After a struggle trying to set Jpeg quality using
managed code in C++ I learn that C++ can't handle 'jagged arrays'
in C++, and that ImageCodecInfo is a jagged array.
To be remedied in Whidbey it seems. Ho Hum.
--
AlexG - Math via C++... more >>
Drawing Bar Chart
Posted by Chen at 9/24/2004 10:52:47 AM
Is there a sample code to drawing bar charts
Thanks
... more >>
Find intermediate points of a line
Posted by raj kumar via .NET 247 at 9/24/2004 3:45:05 AM
(Type your message here)
Hi Everybody,i have an asp.net web application where in which i need to draw line between two points and i also need to find the intermediate points between them. Please help.
--------------------------------
From: raj kumar
-----------------------
Posted by a user ... more >>
Draw a point
Posted by Mathieu Chavoutier at 9/23/2004 3:31:24 PM
Hi.
To draw a point (with a graphic), I can use graphic.DrawLine.
But, there is no method to draw a simple point.
What do have I to use ?
... more >>
Metafile to Bitmap and WindowsXP-SP2
Posted by Kirk Quinbar at 9/23/2004 11:05:59 AM
hi,
I have the following sample .NET 1.0 code which converts a metafile to a
bitmap:
Dim tmpImage As Bitmap 'System.Drawing.Image
Dim streamX As New System.IO.MemoryStream()
Dim fs As FileStream, br As BinaryReader
Dim FilePath As String
Dim data() As Byte
FilePath = Application.Startup... more >>
Eliminating flick
Posted by Alejandro K. at 9/23/2004 10:53:58 AM
i, i got a form with an image as background , and several transparent
controls on it, and i'm suffering of 2 big problems, the first one is that
the controls are flicking whenever the form is activated or whenever is
Bring to the front again. problem two is that same kind of flick when the
s... more >>
Lines flicks in the the picturebox control
Posted by Sam at 9/23/2004 10:24:45 AM
Could anyone tell me why my lines drawn on picturebox control flick when I
resize my form. This problem does not occur in VB6. What I have done is that
I re-draw the lines in the resize event of the picturebox control
SAM
... more >>
improving image resolution
Posted by Al at 9/23/2004 10:24:32 AM
I've been charged with the task of finding a way to reduce the sizes of our
tiff files.
I'm currently using LEAD tools on the client to save the scanned images.
All the
images have to be originally scanned with color since it is not known if
color is needed
until the image is sent to the serve... more >>
anupamsoni@yahoo.com
Posted by Anupam Soni via .NET 247 at 9/21/2004 11:36:20 PM
Hi All,
I am facing one problem in GDI(C#) . I have drwan Pie/Bar graph using system.drawing but now I find out if user click on any segment of pie or rectangle of Bar , that segment/rectangle want to capture.
Plz suggest ?
Thanks&Regards,
Anupam
--------------------------------
From: An... more >>
Enumerating codecs and their parameters
Posted by Nak at 9/21/2004 5:11:25 PM
Hi there,
I wish to be using GDI+ to make a batch conversion utility, but I do not
wish to limit it to 1 codec. According the the documentation,
"You can use an EncoderParameter object to pass an array of values to an
image encoder. You can also use an EncoderParameter object to r... more >>
GDI+ drawing in the top layer
Posted by jason NO[at]SPAM mailinator.com at 9/21/2004 6:49:20 AM
Quick question (I searched but couldn't find the answer, although I'm
sure this has been asked before): Is it possible to simply draw to the
very foremost layer using GDI+? As in, let's say I want to implement
some nice, transparent rubberband selection of controls within a Form.
Now, I can only... more >>
Image file locked
Posted by Naveen K Kohli at 9/20/2004 8:52:02 PM
I am image files that I load into a PictureBox control. After doing some
processing, I close the form that is using the PictureBox control. Then I
try to delete the file but I get the execption thrown that file is being
used by another process. I have tried different methods but nothing helps.... more >>
Why is image is upside down?
Posted by assaf at 9/20/2004 12:26:02 PM
hi all
i included the sources of my form.
when run, u can open a bmp file.
once opened, and resized,
u will see that the image is upside down.
can someone please tell me why this is happening?
tnx
assaf
the code:
using System;
using System.Runtime.InteropServices;
usin... more >>
DrawImage() doesn't work on some images (not just those with indexed pixel format)
Posted by jspaur NO[at]SPAM gmail.com at 9/19/2004 8:27:17 PM
The following line of code: will write on some images and not others.
g.DrawString(text,font,new SolidBrush(Color.YellowGreen),area);
I've gone about showing my area.x and area.y and they give me the
coordinates on the image, then when i hook to the mousemove event on a
imagebox, i just disp... more >>
System.OutOfMemoryException: Out of memory.
Posted by karthik kannappan at 9/17/2004 11:14:41 PM
Hai,
I am new to this group. I face memory problem when i load a 3mb image
in my picturebox in c#. I got the following error
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y,
Int32 width, Int32 height)
... more >>
Suggestions for line graphs?
Posted by Jack Black at 9/17/2004 11:07:41 AM
Hi, all! Using VB.Net behind ASP.Net, and was wondering about how to
achieve a simple two-element line graph. I've looked around a bit,
but I really can't buy a graphing component (company won't spring for
it). Is there a native way to achieve what I want to do, short of
doing line drawing my... more >>
Fast icon drawing under compact framework
Posted by Gavin Williams at 9/16/2004 7:30:11 PM
I'm relatively new to the dotnet framework. I need to draw a 16x16
block array of 16x16 pixel icons in as short a time as possible to
achieve the effect of animation. My code is below (compact framework)
but it runs far too slowly. Do I stand any chance with GDI+?
Private Sub frmMAin_Paint... more >>
Font.FromLogFont argument ?
Posted by Cesar at 9/16/2004 10:45:04 AM
I'm using managed C++.
I need to pass a "LOGFONT structure based" class to the method FromLogFont.
How can I do that ?
I have tried passing structures and classes with the same fields as LOGFONT
but I always get the exception:
"An unhandled exception of type 'System.ArgumentException' occu... more >>
create animated gif ?
Posted by zenjarplan NO[at]SPAM yahoo.de at 9/16/2004 6:16:11 AM
can i create an animated gif with the dotnet framework?... more >>
Font metrics internal leading problem
Posted by chrisfoster NO[at]SPAM btinternet.com at 9/16/2004 2:56:18 AM
I am writing some software that outputs a DXF CAD file. The text
height for a DXF file is the distance from the baseline of the text to
the top of the letter (excluding internal leading)*. I have included
some sample vb code to demonstrate the problem I am having. The
internal leading value I... more >>
Drawing text around a circle?
Posted by MuZZY at 9/16/2004 12:25:28 AM
Hi,
I just wonder if anyone can help me with that:
I need to print some text along a circle
but i can't seem to find an easy way to do that.
I can imagine that it can somehow be done with GraphicPath and Transform,
moving coordinate axes on some angle after each letter but
this way it's go... more >>
How to draw a smooth curve line by 3 points in DrawCurve Method?
Posted by htun at 9/15/2004 9:25:04 PM
Hi,
Is there any formula for drawing a curve line with 3 points in DrawCurve
Method? I will give 3 points and I want to create a smooth curve line by
connecting three points. I want to change the middle point location to
several places and I want to draw a curve line by passing this new l... more >>
Specifying the center point for a rotation
Posted by Phil Jones at 9/15/2004 8:55:52 PM
I'm rotating an object (eg. a GraphicsPath) using the Matrix.Rotate method.
Eg:
Dim myPath As GraphicsPath
Dim matrix As New Matrix
matrix.Rotate(Me.Rotate)
myPath.Transform(matrix)
Is there a way specify the center point around which the ro... more >>
Managed DirectX9, RenderToTexture fails
Posted by Lucvdv at 9/15/2004 10:47:36 AM
In an existing (working) D3D9 VB.Net application, I wanted to add a video
clip rendered to a texture.
The precompiled vbVideoTexture.exe sample from the DX9 SDK (summer 2003
update) works, so I modeled my own code after what I found in the
DX90SDK\Samples\VB.Net\AudioVideo\Texture directory.
... more >>
Create Fence with Cursor
Posted by Jason Newell at 9/14/2004 11:34:36 AM
All,
I've been trying to figure out how to create a fence with the mouse
cursor, like you can on a form in VS.NET to select multiple controls. I'm
wanting the Rectangle that is created when a user click and then drags.
Thanks for the help.
Jason Newell
Software Engineer
... more >>
GDI+ Questions
Posted by Mario Reiley at 9/14/2004 10:17:54 AM
Hi, Group
I am Beginner in graphic programing and I am using C# Languaje. I would like
some advice on how could start maybe some good books, Web sites , white
papers or yours experiences is good too ...
Best Regard
Mario
... more >>
visibleclipbounds
Posted by Steve Hanna at 9/13/2004 5:57:04 PM
I am trying to add print preview to an application using the
printpreviewdialog control. when the printpage event fires, the
visibleclipbounds for the graphics control are incredibly large, on the order
of 1000000 to 3000000. Consequently, my page is being painted in a narrow
band on the r... more >>
XP Theme Get Edit Box Border Color
Posted by damian.hagoort NO[at]SPAM soeidental.com at 9/13/2004 3:48:11 PM
I have been trying to get the blue color that is used as the border of
text boxes, combo boxes etc. in windows XP. The reason is I have a
control which needs this color and I need it to be consistent if they
change to say the silver look instead of the blue. I have looked
extensively in MSDN and... more >>
Draw a line
Posted by Mathieu Chavoutier at 9/13/2004 3:03:33 PM
Hi.
I want to do something like paint.
I want to draw a line. So, the first clic indicates the beginning of the
line. Then, while I have not clic again, the line is following the cursor.
So, when I begin to draw the line, I copy the bitmap with my drawing. Then,
I draw the line, and when th... more >>
problem with displaying a Bitmap after creating it
Posted by Jeroen Stiekema at 9/13/2004 10:06:49 AM
I have a problem with the System.Drawing.Bitmap class. I've created some
code to create a screenshot from an ActiveX component which I'll display on
a Panel.
The ActiveX component has its own Image class, but I have to convert it to
the System.Drawing.Bitmap by setting each pixel into the new... more >>
ImageAttributes SetToIdentity Method Missing?
Posted by george NO[at]SPAM neosoft.com at 9/13/2004 8:41:48 AM
The online documentation for GDI+ shows a SetToIdentity method for the
ImageAttributes class. But, I can't use this method in a VB.Net 1.1
project. It doesn't show up using IntelliSense or the online help.
Most (but not all!) of the other methods do appear.
What am I missing please?
Best... more >>
How to use the Transformation of Pen/Brush?
Posted by Lei Jiang at 9/12/2004 12:18:50 AM
Pen/Brush also has Transformation property and Translate/ScaleXXXX method.
But I dont' understand how to use it. Is there any document on these?
Thanks!
... more >>
How To: Improve image drawing perfomance?
Posted by assaf at 9/11/2004 11:15:38 AM
hi all.
i have a dot net form with a background image.
the image size is 1024 x 768.
i set the form's AutoScrollMinSize to 1024 x 768.
i run the app.
when i gently scroll the form, the cpu shoots up to 100%.
a similar unmanaged application using BitBlt does not invoke to cpu at all.
... more >>
Request for Help: PixelFormat
Posted by Rams at 9/10/2004 6:01:02 PM
Hi,
I am developing an application. This will acquire data from Imaging Device.
The Data is in 256 Gray Color.(8 Bits per Pixel)
I am creating Image using public Bitmap(int, int, int, PixelFormat, IntPtr)
method. This method works fine for Color, and B&W. But for 256 Gray colors I
am not... more >>
A Table and GDI+ challenge in ASP.NET
Posted by Andrej Habazin at 9/10/2004 11:47:16 AM
Hello everyone
Firstly I have to apologise because this post will be a lengthy one. Having
Windows XP pro, VS.NET 2003 pro, SQL Server 2000 and .NET 1.1 properly
installed, I came upon an idea to make a web application, that will enable
users to play chess online with a fellow player. Followin... more >>
How to compare colors?
Posted by Chris Leffer at 9/10/2004 6:45:02 AM
Hi.
I have a label that sometimes appear in red and sometimes in blue. I
need to execute an action based on the label's forecolor but I don't
know if my approach is correct. The code below works:
If lblSign.ForeColor.ToString = "Color [Blue]" Then
...
End If
That is ok or is there a bet... more >>
How to copy Image transparently?
Posted by Lei Jiang at 9/9/2004 5:15:39 PM
I have two Image: A and B. When I draw Image B, it's background is not
drawn. I'd like to copy content of B to A, and don't want the background of
B overwrite the content of A. How coud I do that?
Thanks!
... more >>
Drawing a Rounded Rectanlge
Posted by Brian Reed at 9/9/2004 5:15:09 PM
Is there a simple way to draw a rectangle with rounded edges in .NET using
the System.Drawing class? I seem to recall that there was this ability in
previous versions of MFC.
Thanks,
brian... more >>
16 bit images
Posted by Steve McLellan at 9/8/2004 1:56:17 PM
Hi,
There're some worryingly throwaway lines in the MSDN docs that 16-bit per
channel images are converted to 8-bits per channel for 'processing, display
and saving'. Is it the case then that it's impossible to retrieve the 16-bit
pixel values at all? You can call LockBits giving it (say) the ... more >>
GDI+ Flat API Semi-Transparent Image Problems
Posted by george NO[at]SPAM neosoft.com at 9/8/2004 12:26:16 PM
I can get a partially transparent image to work fine with .Net
(ImageAttribute + ColorMatrix), but have not been able to do so with
the GDI+ flat API for use with classic VB.
I know that I might be able to roll this into a .Net dll, but would
like to avoid doing that, since I have been able to... more >>
|