Code My Own Pan, Zoom and Area Zoom?

Discussions about image processing and document imaging.
Post Reply
PeterH
Posts: 6
Joined: Sat Jul 24, 2010 11:08 am

Code My Own Pan, Zoom and Area Zoom?

Post by PeterH » Mon May 12, 2014 3:57 am

I am trying to find a fast document viewer that will work in ASP across all browsers and multiple document types, mainly Office and PDF. In separate communications, you have explained that the gdviewer is ActiveX and will only work in iExplorer and that you may develop an HTML viewer at some point as a separate product, but not yet.

I have experimented with some other HTML viewers and they are not very fast (and some are too expensive for my budget). I have found software that will convert Office files to either image or PDF, so I have that part covered. I also have software that will extract the pages from PDF's to create JPG's so that part is covered. So, now I am wondering if there is a way to use gdPicture to manipulate images to essentially create my own viewer that only uses image files. I see plenty of ways to handle zooming and resolution, but I do not see an obvious way to handle panning and rectangle-area zooming like it is done in Acrobat to the gdviewer. I guess if that were easy, you would already have an example, but I thought I would ask anyway, especially if there are any functions in the newer versions (8, 9 or 10) that might help me accomplish my goal.

I have noticed that many HTML viewers use the method of extracting a 100% resolution thumbnail on the fly. To zoom double, they simple extract a zoomed image and display that -- but that is not very fast if you want to smoothly zoom in single percentage increments or zoom from the mouse wheel, unless images of preset zooms were stored in a database. Of course users can simply zoom the browser, but that doesn't give the same effect that you get within Acrobat reader. Maybe this functionality isn't practical in a browser with image manipulation, but I thought maybe with enough code and simplified requirements, it could be done and was worth asking if you had any examples or ideas.

I have an older version of gdPicture. I wondered if any of the newer versions had new features that would allow me to simulate a zooming effect and area zoom, but when I went to the documentation page to research this myself, every link to the documentation gave me an error, so also please let me know how I can read the newest documentation.

When I click on the documentation button to go to this URL: https://www.gdpicture.com/gdpicturedoc.zip
I get an Error 404 - Page Not Found.

Thanks!

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Code My Own Pan, Zoom and Area Zoom?

Post by SamiKharma » Mon May 12, 2014 11:06 am

Hi,

You have to understand that Viewing (display, zooming, navigation, scrolling), is two things:
1. Independent from the library you are using (it has to, other wise you will have a wrong structure and unnecessary coupling of functinality).
2. Dependent on the platform it operates on (.NET, HTML, Java, etc)

Basically, all the detailed are involved in the technology you are using and not GdPicture. Now if you want GdPicture to help you with some of the functionality (say you decide to resize the image for zooming) you can use GdPicture as the backend for this operation.

For the documentation, you are looking at the wrong link, here is the right one: https://www.gdpicture.com/guides/gdpicture/

I hope this helps.
Best,
Sami

PeterH
Posts: 6
Joined: Sat Jul 24, 2010 11:08 am

Re: Code My Own Pan, Zoom and Area Zoom?

Post by PeterH » Mon May 12, 2014 6:57 pm

I'm pretty sure that was the link I was using yesterday -- Selected Support then Reference Guides. I was getting 404's last night, but it works now, thx.

I already understand about the platforms, so maybe I need to explain my question a different way. I want to create an ASP.net application that can be viewed using any browser. Resizing an image, for example (zooming) is easy to accomplish in gdPicture as well as others, so I understand that. But I want to create an experience closer to Acrobat. Specifically the following:

1. Panning an image with the hand symbol.
2. Zoom in/out in fine increments using CTRL+mouse wheel, centering on wherever the pan (hand) symbol last rested.
3. Rectangle zoom: choose an area with a mouse, automatically zooms in to that area to fill the image.

I see all of these are possible with the gdViewer, but where I need help is making this work with an ordinary image that I can program these same manipulations on my own, because as I understand it, the gdViewer control is ActiveX so it will only work in iExplorer (not on any of the other browsers) and I guess only on computers running windows.

Is what I am asking possible? If yes, what version is required. Can you point me to any example code that will help me create this functionality on an ordinary image (not with gdViewer)? Or even just explain which functions might help me accomplish this. Or is it impossible?

Thanks

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Code My Own Pan, Zoom and Area Zoom?

Post by SamiKharma » Tue May 13, 2014 1:07 pm

Hi,

Unfortunately, this is not a trivial task at all. It is a very complicated one, and no code samples will help simply because the scope is too big. This is specifically why we created the GdViewer (which is a very complex control).
We are working on a universal web viewer, a release date is not available as of yet. We will make announcements when it is available.

Best,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest