473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Image viewer with a twist

Hi all,
Im a little new to ASP.NET.

I'm looking to create an image viewer that zooms in, pretty common. But I
need to draw a box on the 1:1 scale image and 'zoom in' on another picture
box. The box outlining the zoom area would change in size according to the
level of zoom of course.

The help I need is how to get the target box to appear over the 1:1 scale
image. I want it to be able to be dragged to a new location in the full
scale image so I'm thinking it will need to be a control.

Thx in advance for any hints/links
troy
Nov 19 '05 #1
4 2020
"=?Utf-8?B?VHJveQ==?=" <Tr**@discussions.microsoft.com> wrote in
news:33**********************************@microsof t.com:
Hi all,
Im a little new to ASP.NET.

I'm looking to create an image viewer that zooms in, pretty common.
But I need to draw a box on the 1:1 scale image and 'zoom in' on
another picture box. The box outlining the zoom area would change in
size according to the level of zoom of course.

The help I need is how to get the target box to appear over the 1:1
scale image. I want it to be able to be dragged to a new location in
the full scale image so I'm thinking it will need to be a control.

Would this work?

Zoom Factor * Width of Zoomed Image = Original Width
Zoom Factor * Length of Zomed Image = Original Length

Then you can easily draw a box of Original Width * Original Length.

To center the box, just take 1/2 Original Width and 1/2 Original Length.

If you want the box draggable, you'll have to do some javascript/dhtml
wizardry : )

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Okay, we're talking about a client-server app using HTML as an interface.
So, on the client, we're restricted to what HTML can do, which isn't much.
Dragging and dropping are not difficult, and can be done with JavaScript.
But the rest of it sounds like an ActiveX control or Java applet in the
browser.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Troy" <Tr**@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi all,
Im a little new to ASP.NET.

I'm looking to create an image viewer that zooms in, pretty common. But I
need to draw a box on the 1:1 scale image and 'zoom in' on another picture
box. The box outlining the zoom area would change in size according to
the
level of zoom of course.

The help I need is how to get the target box to appear over the 1:1 scale
image. I want it to be able to be dragged to a new location in the full
scale image so I'm thinking it will need to be a control.

Thx in advance for any hints/links
troy

Nov 19 '05 #3
Thx guys, thats what i was thinking too.

"Troy" wrote:
Hi all,
Im a little new to ASP.NET.

I'm looking to create an image viewer that zooms in, pretty common. But I
need to draw a box on the 1:1 scale image and 'zoom in' on another picture
box. The box outlining the zoom area would change in size according to the
level of zoom of course.

The help I need is how to get the target box to appear over the 1:1 scale
image. I want it to be able to be dragged to a new location in the full
scale image so I'm thinking it will need to be a control.

Thx in advance for any hints/links
troy

Nov 19 '05 #4
Why do you need ASP.Net to do this? Isn't it all client-side and JavaScript
anyway? (It was when I did it 3 years ago.)

In my totally client side page I had a thumbnail, say 200px*200px with an
overlaid gif that was transparent except for a 1px border. The gif was
40px*40px.

I had another image on the page whose source was maybe 2000px*2000px,
displayed in a div/layer limited to 200px*200px and with overflow set to
hidden.

At startup the page displayed with the gif starting at 1px & 1px over the
thumbnail and the large image positioned at 1px & 1px in the clipping
container.

I had javascript attached to the overlay gif to catch any drag event. The
movement was limited so that the rectangle stayed within the bounds of the
thumbnail and when the rectangle was moved the large image was shifted by a
corresponding amount beeath the clipping layer, giving the illusion of a
viewscreen magnifying that portion of the thumbnail under the rectangle.

Addition of some simple math is needed to give the adjustable zoom level you
mention.

Brian Lowe
---------@
"Troy" <Tr**@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi all,
Im a little new to ASP.NET.

I'm looking to create an image viewer that zooms in, pretty common. But I
need to draw a box on the 1:1 scale image and 'zoom in' on another picture
box. The box outlining the zoom area would change in size according to
the
level of zoom of course.

The help I need is how to get the target box to appear over the 1:1 scale
image. I want it to be able to be dragged to a new location in the full
scale image so I'm thinking it will need to be a control.

Thx in advance for any hints/links
troy

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
2
by: Srinivas Chundi | last post by:
I have to display tif images using .asp page. I have tried to read the image as a binary file and stream it to the browser. The relevant code is as follows. Unfortunately, the display on the...
4
by: Shumit Rehman | last post by:
Hi I have a table which has path names to photos I would like to view. I would like to open some/any kind of image viewer(Paint) to see the picture when I click the pathname. The pictures are...
2
by: John Fryatt | last post by:
Hi, Before I go on, let me just say I'm fairly new at this so excuse me if I say the wrong thing or use the wrong term. Anyway, what I am trying to do is to set up something where I can have a...
0
by: Jerry J | last post by:
I have a third party image viewer that can display various types of images. The image viewer is ActiveX and lives inside of Internet Explorer. To get the image viewer to retrieve an image, java...
14
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good...
5
by: mikez | last post by:
Hi, We recently built a very basic file management system for a client in Access 2003 (to use with incoming tif scans). In it we used Microsoft's Document Imaging activex viewer (from Office...
0
by: Andrew | last post by:
Hello Ive been messing around with a simple raw image viewer using Pil and Tkinter However I am running into problems displaying the images they appear to be not correct I believe it is cause of...
4
by: Chuckhriczko | last post by:
I need to possibly twist an image on the z axis in Javascript. Here is the deal. We have sliding effects and so forth for our company's website but there is too much sliding. We want something more...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.