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

Notification

Icon
Error

Options
Go to last post Go to first unread
krekeg  
#1 Posted : Wednesday, March 2, 2005 11:30:00 PM(UTC)
krekeg

Rank: Member

Groups: Member
Joined: 3/2/2005(UTC)
Posts: 13

I am currently trialling Graphics Mill (v2 I think). I have some images that have been saved out of Photoshop, some of which have a resoltion of 118pixels/cm and some have 300pixels/inch.

When I retreive the Vertical/HorizontalResolution I get 118 and 300 respectively. How can I tell programmaticaly if these values are per inch or per cm?

Thanks
Fedor  
#2 Posted : Wednesday, March 2, 2005 11:37:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,548

Thanks: 5 times
Was thanked: 59 time(s) in 58 post(s)
Graphics Mill always returns resolution in pixels per inch. Could you submit case with sample images with 118pixels/cm and 300pixels/inch resolution?

Edited by user Friday, May 23, 2008 3:16:39 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
krekeg  
#3 Posted : Thursday, March 3, 2005 12:19:00 AM(UTC)
krekeg

Rank: Member

Groups: Member
Joined: 3/2/2005(UTC)
Posts: 13

I have just tried the same images with version 3 and it returns all the resolutions as dpi. However it is an awfull lot slower loading the images than version 2 and is using lots of memory.
Fedor  
#4 Posted : Thursday, March 3, 2005 12:56:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,548

Thanks: 5 times
Was thanked: 59 time(s) in 58 post(s)
However it is an awfull lot slower loading the images than version 2 and is using lots of memory.

Can you post the code you used for loading images with Graphics Mill 3.0 for .NET? Don't forget that in .NET you need to dispose objects if you want to have memory friendly application.
Best regards,
Fedor Skvortsov
krekeg  
#5 Posted : Thursday, March 3, 2005 1:15:00 AM(UTC)
krekeg

Rank: Member

Groups: Member
Joined: 3/2/2005(UTC)
Posts: 13

Version 3 Code;

Code:
        Dim myFolder As New System.IO.DirectoryInfo("C:\epson")

        Dim myFile As System.IO.FileInfo

        For Each myFile In myFolder.GetFiles("*.tif")

            Dim myGraphic As New Aurigma.GraphicsMill.Bitmap
            myGraphic.Load(myFile.FullName)

            Console.WriteLine(myFile.Name)
            Console.WriteLine("Resolution: " & myGraphic.HorizontalResolution)
            Console.WriteLine("Width: " & myGraphic.Width)
            Console.WriteLine("Height: " & myGraphic.Height)
            Console.WriteLine("Space: " & myGraphic.ColorSpace.ToString)
            Console.WriteLine()

            myGraphic.Dispose()

        Next


Version 2 Code;

Code:
       Dim myFolder As New System.IO.DirectoryInfo("C:\epson")
       Dim myFile As System.IO.FileInfo

       For Each myFile In myFolder.GetFiles("*.tif")

           Dim myGraphic As New Aurigma.GraphicsMill.Bitmap
           myGraphic.IsLzwEnabled = True
           myGraphic.LoadFromFile(myFile.FullName)

           Console.WriteLine(myFile.Name)
           Console.WriteLine("Resolution: " & myGraphic.HorizontalResolution)
           Console.WriteLine("Width: " & myGraphic.Data.Width)
           Console.WriteLine("Height: " & myGraphic.Data.Width)
           Console.WriteLine("Space: " & myGraphic.Data.PixelFormat.ToString)
           Console.WriteLine()

       Next


The version 2 code takes less than 1 second to run through 11 files, the version 3 code takes 49 seconds!

I must be doing something wrong.

Edited by user Monday, December 24, 2007 4:08:03 PM(UTC)  | Reason: Not specified

Andrew  
#6 Posted : Friday, March 4, 2005 3:13:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
Ok, we will test this code with the profiler and inform you about results.

I have suspicion that it makes long initialization somewhere once. So if you will run 50 files instead of 11, it will be running almost the same time.

Meanwhile I would advise you to take the bitmap creating out of the loop, something like this:

Code:
Dim myGraphic As New Aurigma.GraphicsMill.Bitmap
For Each myFile In myFolder.GetFiles("*.tif")
  myGraphics.Load(myFile.FullName)
  
  ' ....

Next
myGraphic.Dispose

Edited by user Monday, December 24, 2007 4:08:18 PM(UTC)  | Reason: Not specified

krekeg  
#7 Posted : Friday, March 4, 2005 5:06:00 PM(UTC)
krekeg

Rank: Member

Groups: Member
Joined: 3/2/2005(UTC)
Posts: 13

Thanks for the reply.

I made the changes mentioned but with no speed increase.

The delay is when the .load() is called. The time is takes to open I would have said was OK considering the size of the files, it's just that version2 seemed to open them instantly.

I'll look forward to your results.
Andrew  
#8 Posted : Saturday, March 5, 2005 1:39:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 866

Thanks: 2 times
Was thanked: 26 time(s) in 26 post(s)
By the way, an example of the file which causes the problem would be helpful. Could you submit case? If the file is too large, you could just send a link where I can download it from.

BTW, I noticed that you created an appropriate topic in the Graphics Mill .NET forum. So I will post the results there.

Edited by user Friday, May 23, 2008 3:17:16 PM(UTC)  | Reason: Not specified

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.