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

Notification

Icon
Error

Options
Go to last post Go to first unread
neojmj  
#1 Posted : Friday, October 3, 2003 1:56:00 PM(UTC)
neojmj

Rank: Member

Groups: Member
Joined: 10/3/2003(UTC)
Posts: 1

I tried to read a Big image like this, and 'c:\bigImage.jpg' is 3084x2048 sized image

code in ASP

Code:
Set objRasterObject = Server.CreateObject("GraphicsProcessor2002.RasterObject")
objRasterObject.LoadFile "c:\bigImage.jpg"

response.write  objRasterObject.Width

I expected that code to reponse 3084, but that code responsed "0"

So I tested same code with a smaller image which was 2048x1360 size and It responsed 2048 exactly

I wonder is it impossible to read a very big sized image(over 3000 pixels) ??

If it is possible, please tell me how to read it.

- Windows 2000 server

- 1GByte memory

- P4 zeon dual CPU

Sorry, I can't speak English very well, but please understand my problem ^^ :)

Edited by user Thursday, December 20, 2007 6:34:00 PM(UTC)  | Reason: Not specified

Andrew  
#2 Posted : Friday, October 3, 2003 2:14:00 PM(UTC)
Andrew

Rank: Advanced Member

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

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
Could you submit case with this image in order we could test it. I just tried 5000x2258 image and it displayed dimensions correctly. It is possible this image could not be read with Graphics Processor...

Edited by user Thursday, May 22, 2008 9:07:06 PM(UTC)  | Reason: Not specified

Andrew  
#3 Posted : Monday, November 24, 2003 2:00:00 PM(UTC)
Andrew

Rank: Advanced Member

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

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
By the way, in new product Graphics Mill you can read width/height (and some other data) without having to load entire file to memory. It is useful when you need to get only file information (for example to display file list with some file stats).
JBramble  
#4 Posted : Wednesday, May 5, 2004 12:36:00 AM(UTC)
JBramble

Rank: Member

Groups: Member
Joined: 5/5/2004(UTC)
Posts: 1

I was curious how this was resolved? I am having a similar issue, but I notice it is hit or miss (with no coding change). Sometimes I can load a large image, and other times, I get the same behavior (width & height = 0). I think it is somehow tied to how busy the web server is at the time it is attempted in my case. Is there anyway to trap errors loading a file from the LoadFile Meathod? Thanks!

-Jason Bramble

Andrew  
#5 Posted : Wednesday, May 5, 2004 2:18:00 PM(UTC)
Andrew

Rank: Advanced Member

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

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
Hello Jason,

I would recommend you to upgrade to Graphics Mill. It does not have such problems with loading large images (at least if it fails, it raises a error).

However if you want to handle loading failure in Graphics Processor, you should check width/height in addition to On Error... statement:

Code:
On Error Resume Next
objRaster.LoadFile "image.jpg"
If Err <> 0 Or objRaster.Width = 0 Then
  ' Do error handling...
End If

Edited by user Thursday, December 20, 2007 6:34:14 PM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
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.