Article View: be.comp.programming
Article #5130Images in VB.NET
From: Codaria
Date: Fri, 06 Jun 2003 10:05
Date: Fri, 06 Jun 2003 10:05
91 lines
4505 bytes
4505 bytes
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C32C23.EFAB6310
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hallo,
Ik heb de volgende sub:
Private Sub SaveImage(ByVal strId As String, ByVal strAfbeelding As =
String)
Dim imgAfbeelding, imgThumb As System.Drawing.Image
Dim inp As New IntPtr()
imgAfbeelding =3D Image.FromFile(strAfbeelding)
imgThumb =3D imgAfbeelding.GetThumbnailImage(75, 50, Nothing, inp)
imgThumb.Save("c:\test_small.jpg", Imaging.ImageFormat.Jpeg)
imgAfbeelding.Save("c:\test_big.jpg", Imaging.ImageFormat.Jpeg) Op deze =
regel kijg ik altijd de volgende fout:
An unhandled exception of type =
'System.Runtime.InteropServices.ExternalException' occurred in =
system.drawing.dll
Additional information: A generic error occurred in =
GDI+.=20
imgAfbeelding.Dispose()
imgThumb.Dispose()
End Sub
Wat doe ik mis en vooral hoe kan ik deze fout oplossen?
Hartelijk dank
------=_NextPart_000_0008_01C32C23.EFAB6310
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hallo,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Ik heb de volgende sub:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><FONT color=3D#0000ff>Private Sub =
SaveImage(ByVal=20
strId As String, ByVal strAfbeelding As String)<BR></FONT>Dim =
imgAfbeelding,=20
imgThumb As System.Drawing.Image<BR>Dim inp As New =
IntPtr()<BR><BR>imgAfbeelding=20
=3D Image.FromFile(strAfbeelding)<BR><BR>imgThumb =3D=20
imgAfbeelding.GetThumbnailImage(75, 50, Nothing,=20
inp)<BR><BR>imgThumb.Save("c:\test_small.jpg",=20
Imaging.ImageFormat.Jpeg)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><BR><FONT face=3DArial=20
size=3D2>imgAfbeelding.Save("c:\test_big.jpg", =
Imaging.ImageFormat.Jpeg) =20
<FONT color=3D#ff0000>Op deze regel kijg ik altijd de volgende=20
fout:</FONT></FONT></DIV>
<DIV><FONT face=3DArial color=3D#ff0000=20
size=3D2> &nbs=
p; =20
An unhandled exception of type=20
'System.Runtime.InteropServices.ExternalException' occurred in=20
system.drawing.dll</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT=20
color=3D#ff0000> &nb=
sp; =20
Additional information: A generic error occurred in=20
GDI+. <BR></FONT><BR>imgAfbeelding.Dispose()<BR>imgThumb.Dispose()<B=
R><FONT=20
color=3D#0000ff>End Sub</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Wat doe ik mis en vooral hoe kan ik =
deze fout=20
oplossen?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Hartelijk =
dank</FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C32C23.EFAB6310--
Technical Details
Message-ID:
<SHZDa.40099$1u5.2830@afrodite.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!wn14feed!worldnet.att.net!204.71.34.3!newsfeed.cwix.com!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,d7a747070a276fa3,start X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2003-06-06 03:06:06 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!wn14feed!worldnet.att.net!204.71.34.3!newsfeed.cwix.com!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail From: "Codaria" <codaria@hotmail.com> Newsgroups: be.comp.programming Subject: Images in VB.NET Lines: 92 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0008_01C32C23.EFAB6310" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <SHZDa.40099$1u5.2830@afrodite.telenet-ops.be> Date: Fri, 06 Jun 2003 10:05:38 GMT NNTP-Posting-Host: 213.224.120.171 X-Complaints-To: abuse@telenet.be X-Trace: afrodite.telenet-ops.be 1054893938 213.224.120.171 (Fri, 06 Jun 2003 12:05:38 MET DST) NNTP-Posting-Date: Fri, 06 Jun 2003 12:05:38 MET DST Organization: Telenet Internet