..43Hi,
I am trying to extract tiff images from a multipage tiff and save them to
disk. This is becoming almost a nightmare for me. I have seen several
examples on the net that talk about this. For example : http://www.codeproject.com/vb/net/faxeditor.asp THis example should work
great. But when I even try to load the multipage tiff that came with the
example I receive a general gdi+ error.
The same for a TIffManager Class written in c#. I also receive a general
GDI+ error with a totally diffrent multipage tiff. http://www.codeproject.com/csharp/TiffManager.asp
I am trying this on a WIndows XP machine and a WIndows 2003 server. Both
have all updates installed (.net 1.1, sp's etc..) v1.1.4322.
What is going on here? 8 5035
Hi,
Here is an example which works fine on my machine. There is sample
code in vb.net and c# http://www.bobpowell.net/addframes.htm
Ken
-------------------
"Philip Wagenaar" <ph************ *@online.nospam > wrote in message
news:EA******** *************** ***********@mic rosoft.com... .43Hi,
I am trying to extract tiff images from a multipage tiff and save them to disk. This is becoming almost a nightmare for me. I have seen several examples on the net that talk about this. For example : http://www.codeproject.com/vb/net/faxeditor.asp THis example should work great. But when I even try to load the multipage tiff that came with the example I receive a general gdi+ error.
The same for a TIffManager Class written in c#. I also receive a general GDI+ error with a totally diffrent multipage tiff. http://www.codeproject.com/csharp/TiffManager.asp
I am trying this on a WIndows XP machine and a WIndows 2003 server. Both have all updates installed (.net 1.1, sp's etc..) v1.1.4322.
What is going on here?
Hi,
I also tried that, that gives me an error on the line:
g.DrawImageUnsc aled(bm, 0, 0)
in the doOpen sub.
It is a bufferoverflow error I believe.
"Ken Tucker [MVP]" wrote: Hi,
Here is an example which works fine on my machine. There is sample code in vb.net and c#
http://www.bobpowell.net/addframes.htm
Ken ------------------- "Philip Wagenaar" <ph************ *@online.nospam > wrote in message news:EA******** *************** ***********@mic rosoft.com... .43Hi,
I am trying to extract tiff images from a multipage tiff and save them to disk. This is becoming almost a nightmare for me. I have seen several examples on the net that talk about this. For example : http://www.codeproject.com/vb/net/faxeditor.asp THis example should work great. But when I even try to load the multipage tiff that came with the example I receive a general gdi+ error.
The same for a TIffManager Class written in c#. I also receive a general GDI+ error with a totally diffrent multipage tiff. http://www.codeproject.com/csharp/TiffManager.asp
I am trying this on a WIndows XP machine and a WIndows 2003 server. Both have all updates installed (.net 1.1, sp's etc..) v1.1.4322.
What is going on here?
Hi
I think that maybe caused by the GDI+ limitation.
So far .NET use GDI+ 1.0.
Here is a KB for you reference.
CAUSE
=====
This issue occurs because the improved Graphics Device Interface (GDI+) in
Windows XP provides less support to read TIFF image files that are
compressed in the JPEG format. In this scenario, the image file may not
open correctly.
885938 TIFF image files that are compressed in the JPEG format cannot be http://support.microsoft.com/?id=885938
Please follow the steps above to have a test and let me know the result.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Btw: I also have a gdi+ error with a C# application. A thread on this is
located at : http://msdn.microsoft.com/newsgroups...b-9fcbf70803e6
The TIff image I am trying to splitt uses group 4 compression, this is
standard for fax software.
I tried the solution in the KB article, but it resulted in the same error.
""Peter Huang" [MSFT]" wrote: Hi
I think that maybe caused by the GDI+ limitation. So far .NET use GDI+ 1.0.
Here is a KB for you reference. CAUSE =====
This issue occurs because the improved Graphics Device Interface (GDI+) in Windows XP provides less support to read TIFF image files that are compressed in the JPEG format. In this scenario, the image file may not open correctly.
885938 TIFF image files that are compressed in the JPEG format cannot be http://support.microsoft.com/?id=885938
Please follow the steps above to have a test and let me know the result.
Best regards,
Peter Huang Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
Hi
Here is another KB aricle.
329270 You Cannot View TIFF Images Using Windows Picture and Fax Viewer http://support.microsoft.com/?id=329270
So I think the problem may be caused by that the tiff format of your tiff
file is not supported by GDI+ which is included in .NET 1.1 so ar.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
I changed the encoding to LZW as explained in http://support.microsoft.com/?id=885938
gdi+ supports the LZW encoding and it stills fails.
I viewed file properties using windows explorer and it shows that the width
and height are set, but the resolution is 0 by 0 for the file that gives the
error.
Does gdi+ need these to be set for it to work properly?
""Peter Huang" [MSFT]" wrote: Hi
Here is another KB aricle. 329270 You Cannot View TIFF Images Using Windows Picture and Fax Viewer http://support.microsoft.com/?id=329270
So I think the problem may be caused by that the tiff format of your tiff file is not supported by GDI+ which is included in .NET 1.1 so ar.
Best regards,
Peter Huang Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Philip,
Can you view the tiff file with Windows Picture and Fax Viewer?
Because that tool use GDI+ 1.1, so if that can not open the tiff, I think
that may not support the format.
Microsoft Office 2003 has a Microsoft Office document imaging.
You may try to print the tiff file with a printer(documen t imaging) to see
if that works.
NOTE: by default that MODI may save it in jpeg format, you may try to
change it to LZW format.
Also .NET 1.1 use GDI+ 1.0, so that may have somewhat incompatible.
If you still have any concern, can you try to send me a copy your test tiff?
You may reach me via removing "online" from my email address.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Philip,
Based on my research, it seems there is something problem to paint the
frames in the tiff, but based on test, we can save it with the BMP format.
If you also need to show it, I think you may try to save it first and then
show that.
The code below is changed according to Ken's link. http://www.bobpowell.net/addframes.htm
If bm.GetFrameCoun t(FrameDimensio n.Page) > 1 Then
Dim i As Integer
For i = 0 To (bm.GetFrameCou nt(FrameDimensi on.Page)) - 1
bm.SelectActive Frame(FrameDime nsion.Page, i)
bm.Save("c:\tes t" & i.ToString() & ".bmp",
ImageFormat.Bmp ) 'We can save it.
Dim temp As New Bitmap(bm.Width , bm.Height)
Dim g As Graphics = Graphics.FromIm age(temp)
g.Interpolation Mode = InterpolationMo de.NearestNeigh bor
'g.DrawImage(bm , 0, 0, 100, 100)
g.Dispose()
AddFrameToList( temp, -1)
Next i
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Pohihihi |
last post by:
I am getting a generic GDI+ error on following code. Basically it is trying
to capture screen image and save in a file.
Is there a way to find more details on this error? Thanks for the help.
---------------------------
ERROR MSG
---------------------------
System.Runtime.InteropServices.ExternalException: A generic error occurred
in GDI+.
at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder,
|
by: Philip Wagenaar |
last post by:
I use a class to manage tiff's (written by someone else) to splitt multipage
tiffs. However, when I run it, it fails, for other people it seems work ok.
The method in the class is :public ArrayList SplitTiffImage(string
outPutDirectory,EncoderValue format)
{
string
fileStartString=outPutDirectory+"\\"+GetFileNameStartString(_ImageFileName);
ArrayList splitedFileNames=new ArrayList();
try
|
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 below.
I am running IIS5 on WinXP Pro.
Server Error in '/Chapter04' Application.
----------------------------------------------------------------------------
----
A generic error occurred in GDI+.
Description: An unhandled exception occurred...
|
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 open that file in whatever viewer/editor is
the default for the users system. I tried to do
picturebox1.image.save(filename), which results in "A Generic error occured
in GDI+".
However, if I use an unbound picturebox, do a
|
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 path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run from the upload function: A generic error occurred in GDI+. Not sure what exactly that means. From what...
| |
by: Robin van de Water [synthesiSFactory] |
last post by:
Hi All,
In one of my web applications, I intercepted the following error in the
Application_Error part of the Global.Asax:
GDI+ is not properly initialized (internal GDI+ error).
The error as it was mentioned in the server's event viewer shows the
following error message:
|
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:
System.Drawing.Graphics.CheckErrorStatus(Int32 status)
System.Drawing.Graphics.DrawString(String s, Font font, Brush brush,
RectangleF layoutRectangle, StringFormat format)
System.Drawing.Graphics.DrawString(String s, Font font, Brush brush,
PointF...
|
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:
System.Drawing.Graphics.CheckErrorStatus(Int32 status)
System.Drawing.Graphics.DrawString(String s, Font font, Brush brush,
RectangleF layoutRectangle, StringFormat format)
System.Drawing.Graphics.DrawString(String s, Font font, Brush brush,
PointF...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |