Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
bcardi  
#1 Posted : Monday, August 27, 2007 12:03:18 AM(UTC)
bcardi

Rank: Member

Groups: Member
Joined: 8/25/2007(UTC)
Posts: 7

I am using the evaluation version of Graphics Mill.

When I load folder items into a ThumbNailListView control and set the View type to Thumbnails, I get the windows default thumbnail image instead of a thumbnail of the actual image file.

Any ideas that might cause this? Here is my code, which is taken from the "Using Work Areas" topic in the Aurigma help file.

Code:
        private void OpenDocument()
        {
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                String path = System.IO.Path.GetDirectoryName(openFileDialog.FileName);
                String documentFolder = System.IO.Path.GetFileNameWithoutExtension(openFileDialog.FileName);
                String documentPage = path + "\\" + documentFolder + "\\source\\1.dat";
                String thumbs = path + "\\" + documentFolder + "\\thumbs\\";
                OpenDocumentFromFile(documentPage);
                JumpToPidl(Aurigma.GraphicsMill.WinControls.Pidl.Create(@thumbs), thumbnailListView);
            }
        }

        private void JumpToPidl(Aurigma.GraphicsMill.WinControls.Pidl pidl, Aurigma.GraphicsMill.WinControls.ThumbnailListView thumbnailListView)
        {
            //Set the thumbnail view
            thumbnailListView.View = Aurigma.GraphicsMill.WinControls.View.Thumbnails;

            //Add necessary working areas
            Rectangle[] areas = {new Rectangle(0, 5, thumbnailListView.IconSpacing.X * 
                pidl.Items.Length, thumbnailListView.IconSpacing.Y)};
            thumbnailListView.WorkAreas = areas;

            //Clear all previously displayed items
            thumbnailListView.Items.Clear();

            int itemIndex = 0;

            //Add each item in the folder to the thumbnail list
            foreach (Aurigma.GraphicsMill.WinControls.Pidl subPidl in pidl.Items)
            {
                thumbnailListView.Items.Add(new
                    Aurigma.GraphicsMill.WinControls.ThumbnailListItem(subPidl));

                //Move the added item to a required working area
                thumbnailListView.MoveItemToWorkArea(itemIndex, 0);
                itemIndex++;
            }
        }

Edited by user Monday, December 17, 2007 1:21:26 PM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Monday, August 27, 2007 9:29:51 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

It seems that Graphics Mill for .NET cannot load thumbnails from files for some reason. Try to load some of these files into Bitmap instance: you can write small application which calls Bitmap.Load method or just open some of them in the Main sample application. If some error occurs while load, it will show the reason of the problem.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.