noch mal ich, hab weiter gesucht ...
zuerst hab ich das gefunden ...
I seem to recall that you get a misleading "out of memory" exception when
the format of the image file is wrong, so make sure you can load a smaller
image of the exact same type, and if not, look for other causes of the
problem. http://www.eggheadcafe.com/software/aspnet/30792778/out-of-memory-when-loadin.aspx
und danach das, was imho dem ersten widerspricht
I found a few problems that might be causing this:
1.
The program does not have permissions to access the image file. (Yes, you _
can get an out of memory exception even if the problem is permission _
related)
2.
The BackgroundImage propery is set directly from the Bitmap.FromFile _
method.
3.
You are reading an image that is currently being written to. Make sure _
all file handles with a write lock to that image with write access are _
closed.
Though I have read some people have had problems with the TIFF format before, _
it might be a problem with the framework. http://forums.asp.net/p/1022881/1389316.aspx#1389316
acdsee zeigt das bild ohne probleme an, kann ich nun irgendwie das tif analysieren ob es absolut korrekt ist, nicht das acdsee irgendwelche fehlertoleranzen hat?
ich hab nämlich inzwischen rausgefunden, das andere TIFs durchaus angezeigt werden ohne fehlermeldung.
... mal eben schnell ein prögchen klöppeln mit dem man jeden frames eineis multiframe tifs in ein jpg speichert und in ne db speichert ...
Nachtrag:
hmm, hmm, hmm ... wenn ich dem mal glauben schenken darf
http://www.mycsharp.de/wbb2/thread.php?postid=316449
Tiff ist nicht gleich Tiff. Das Tagged Image File Format erlaubt eine Vielzahl _
möglicher Einstellungen, die selten von einem Programm komplett abgedeckt _
werden.
Ich vermute, dass das Tif-Bild, das die Exception wirft, mittels _
Jpeg-Komprimierung komprimiert wurde. GDI+ unterstützt bis heute nur _
verlustfreihe Kompression wie beispielsweise die LZW-Kompression.
.NET unterstützt tatsächlich nicht besonders viele Grafik-(Unter-)Formate. Im _
Zweifel musst du auf die Bibliothek eines Drittanbieters ausweichen. muss ich mein tif tatsächlich mal analysieren wie es gespeichert ist, gespeichert wurde es auf jeden fall mit dem microsoft image document dingens direkt von nem scanner ... komme grad nicht auf den namen, hab das prog hier nicht drauf.
Nachtrag:
so langsam werde ich mir immer sicherer ...
The MSDN says "If the file does not have a valid image format or if GDI+ does" & _
"not support the pixel format of the file, this method throws an" & _
"OutOfMemoryException exception." http://www.csharpfriends.com/Forums/ShowPost.aspx?PostID=46316
und ...
Just a hint. You are using GDI+. It is known for throwing an OutOfMemory
exception when something is wrong with image files. Most recently I had one
when I tried to open a multi-paged tiff file with pages in different format. http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic34207.aspx
kann da nicht einfach ne meldung kommen "fileformat nicht unterstützt"? dann wüßte man sofort bescheid und muss nicht stundenlang suchen, rätseln und halbsinnlose threads wie diesen öffnen.
wobei, vielleicht hilft es ja meiner nachwelt weiter ...
bedanke mich brav bei ralf für seinen beitrag und beim mir für das konstuktive selbstgespräch 
Beitrag wurde zuletzt am 05.08.08 um 08:41:19 editiert. |