473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

generic error in gdi+

hai every body


i am using the below code for creating an dot net com component for using with classic asp.

this is only a striped code for manipulating image

i can register the component using vbc,regasm ,gacutil

i can create objects with following code
<%
set te=Server.CreateObject("imagetester4")
'te.get_masterfile=server.MapPath("dils.jpg")
'te.get_masterimage=server.MapPath("asg_seal.gif")
'te.image_marker()
'response.write te.exception_control &"<br>"
'response.write te.get_exception

te.imagesaver(server.MapPath("dils.jpg"))



%>
but this gives an error
Tipo di errore:
System.Drawing (0x80004005)
Errore generico in GDI+.
/imageeditor/mytest.asp, line 11


i dont know what is the cause of the error .i search many sites and forums but can not get any right answer.can any one able to help me ,please welcome.if you also have any suggestions please share with me.


Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Drawing.Text
Imports System
Imports System.Runtime.InteropServices

<InterfaceTypeAttribute(ComInterfaceType.Interface IsIDispatch)> _
Public Interface evtSenior3
Sub Senior()
End Interface
<ComSourceInterfacesAttribute("evtSenior3")> _
Public Class imagetester2
Public Function imagesaver(ByVal filename As String) As Boolean

Dim fs As IO.FileStream = New IO.FileStream(filename, IO.FileMode.Open, IO.FileAccess.Read)
Dim img(fs.Length) As Byte
fs.Read(img, 0, Convert.ToInt32(fs.Length))



Dim jk As Image = Image.FromStream(fs)
fs.Close()
Dim bm As New Bitmap(jk, jk.Width, jk.Height)
bm.Save("c:/dil2.jpg")
jk.Dispose()
bm.Dispose()
fs.Dispose()


End Function
End Class


salute from dils
May 3 '07 #1
1 880
MMcCarthy
14,534 Expert Mod 8TB
You've posted in the Articles section. I'm moving your post to the .NET forum.

ADMIN
May 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Michael Kennedy [UB] | last post by:
Hi Everyone, I have this multithreaded C# windows forms application which does a lot of image processing. Occasionally, I get the following error: A generic error occurred in GDI+....
2
by: Alphonse Giambrone | last post by:
I am currently reading 'Programming The Web with Visual Basic .NET' and have so far found it to be excellent. Downloaded all the code from Apress and working in chapter 4, I get the error shown...
3
by: T. Davis | last post by:
In C#, I am able to successfully stream a TIFF image that comes from a BLOB field in a database, save it to file, then convert the pages within TIFF file into jpegs (using GDI+) and display on the...
13
by: lgbjr | last post by:
Hello All, I have some pictureboxes on a VB.NET form that are linked to an AccessDB. If the user wishes to open or edit an image, I need to save the image in the picturebox to a temp file, then...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
0
by: James Wong | last post by:
Hi everybody, I'm facing a serious trouble relating to GDI+ generic error. The error message is "A Generic error occured in GDI+" and the following information is stored in Excepton object:...
14
by: James Wong | last post by:
Hi everybody, I'm facing a serious trouble relating to GDI+ generic error. The error message is "A Generic error occured in GDI+" and the following information is stored in Excepton object:...
0
by: manini | last post by:
Hello Everyone I m getting the generic GDI + error,Please help me to resolve this error ************** Exception Text ************** System.Runtime.InteropServices.ExternalException: A generic...
7
by: j4richard | last post by:
Help please, I am getting this "Unhandled Exception has occurred in your application" " A Generic error occurred in GDI+" See the end of this message for details on...
1
by: Jeff | last post by:
hi asp.net 2.0 I'm experimenting with GDI+ in asp.net and get an "A generic error occurred in GDI+." exception. Below is my code, I've marked a line with "<<<<-- here". It's here the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.