Page 1 of 1
large TIFFs
Posted: Wed Nov 18, 2009 6:58 pm
by Harry
Hi Loïc,
I have to manage very large images (200 - 600 mb Tiffs). I want to step thru a treeview (filenames) and load the activated file to the GdViewer. Before I load the image, I make a CloseDocument to clear the viewer. With larger images it seems, that the file is not closed properly. I can't open the file. Do you have any idea? I have not found a funkton like a release to free the memory, close the file or thomething?!?
thanks in advantage,
Harry
Re: large TIFFs
Posted: Wed Nov 18, 2009 8:26 pm
by Loïc
Hi Harry,
Please, give us some part of the code you are using to load & unload your image.
Also, are you using the latest release ?
Kind regards,
Loïc
Re: large TIFFs
Posted: Tue Dec 15, 2009 5:22 pm
by Harry
Hi Loïc,
sorry for the late reply, but there was another project with higher priority.
Here is the code, I'm using to display the activated TIFF-File in a treeview:
Code: Select all
private void myTreeView_AfterSelect(object sender, TreeViewEventArgs e)
{
GD_View.CloseDocument();
GD_View.OptimizeDrawingSpeed = true;
GD_View.DisplayQualityAuto = true;
if (e.Node.Tag != null)
{
int iSZ = 0;
if (File.Exists(e.Node.Name))
{
// Loop to check if anybody else is using the file
for (int i = 1; i < 30; i++)
{
if (FileHandleIsFree(e.Node.Name))
{
iSZ = i;
i = 35;
}
}
if (iSZ > 0)
{
try
{
GD_PicStat = GD_View.DisplayFromFile(e.Node.Name);
}
catch
{
// ERROR-Handling
}
finally
{
if (GD_PicStat != GdPictureStatus.OK)
{
// All OK
}
else
{
// ERROR-Handling...
}
}
}
else
{
GD_View.DisplayFromFile("ERROR.bmp");
}
}
else
{
GD_View.DisplayFromFile("DELETED.bmp");
}
}
Application.DoEvents();
}
Is it possible, that the event tries to open the next file while the GDViewer is opening the last one? Or Is the Problem the CloseDocument Statement
Many thanks in advantage,
Harry
Re: large TIFFs
Posted: Mon Dec 21, 2009 11:14 am
by Harry
Hi Loïc,
no solution for this Problem?
best regards,
Harry
Re: large TIFFs
Posted: Tue Jan 05, 2010 12:00 pm
by Harry
Hi Loïc,
happy new year!!!
I saw, that you worked all days including the chrismas days. Do you also have a solution for my problem? I only have a few days to complete my application.
thanks a lot in advantage,
Harry
Re: large TIFFs
Posted: Tue Jan 05, 2010 3:13 pm
by Loïc
Hi Harry !
Thank you & happy new year too. I am sorry but I thought your problem was already solved.
I don't understand the origin of your problem. maybe you can give me more details ?
When you say "I can't open the file.". What is the returned value of the DisplayFromFile() function ?
The GdViewer should be able to display very large file without any problem. I suspect a file lock or something like that in your application...
Cheers,
Loïc
Re: large TIFFs
Posted: Fri Jan 08, 2010 11:22 am
by Harry
Hi Loïc,
before opening the file I check, if I can get a handle for the file. i think, that i try to open the next file while the GDViewer wants to open the first one. I want to make a little test with two Buttons to load two differnt files. this will be the same like klicking it in a treeview. I will give you a status with the returncodes of the GDViewer as soon as possible.
Best regards,
Harry