473,761 Members | 9,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image Viewer ...

Hi all

I need to do a image viewer, just to view and zoom pictures
in jpeg. I do not need to edit or save the picture.

I am sure, there are some controls already made.
I am thankful for any comment on that !

Best regards
Frank Uray
Dec 7 '07 #1
4 6469
Hello Frank,

You need to use GDI+ for this.
Use MSDN for more info and google to find samples how to use it
http://www.c-sharpcorner.com/UploadF.../gdi_plus.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
FUHi all
FU>
FUI need to do a image viewer, just to view and zoom pictures in jpeg.
FUI do not need to edit or save the picture.
FU>
FUI am sure, there are some controls already made.
FUI am thankful for any comment on that !
FUBest regards
FUFrank Uray
Dec 7 '07 #2
On Dec 7, 6:43 am, Frank Uray <FrankU...@disc ussions.microso ft.com>
wrote:
Hi all

I need to do a image viewer, just to view and zoom pictures
in jpeg. I do not need to edit or save the picture.

I am sure, there are some controls already made.
I am thankful for any comment on that !
I would recommend doing research into the System.Drawing Image Class:

http://msdn2.microsoft.com/en-us/lib...ing.image.aspx

And into the System.Windows. Forms PictureBox control:

http://msdn2.microsoft.com/en-us/lib...icturebox.aspx

The PictureBox control has an Image property that works exactly like
the Image Class. Pay particular attention to the PictureBox SizeMode
property.

There is no builtin .NET code to do zooming, but it can be
accomplished by setting the Top and Left properties of the picturebox
to be outside of the form.

Dec 7 '07 #3
On Dec 7, 9:25 am, za...@construct ion-imaging.com wrote:
On Dec 7, 6:43 am, Frank Uray <FrankU...@disc ussions.microso ft.com>
wrote:
Hi all
I need to do a image viewer, just to view and zoom pictures
in jpeg. I do not need to edit or save the picture.
I am sure, there are some controls already made.
I am thankful for any comment on that !

I would recommend doing research into the System.Drawing Image Class:

http://msdn2.microsoft.com/en-us/lib...ing.image.aspx

And into the System.Windows. Forms PictureBox control:

http://msdn2.microsoft.com/en-us/lib....forms.picture...

The PictureBox control has an Image property that works exactly like
the Image Class. Pay particular attention to the PictureBox SizeMode
property.

There is no builtin .NET code to do zooming, but it can be
accomplished by setting the Top and Left properties of the picturebox
to be outside of the form.
Let me add something. One of the valid values for the
PictureBox.Size Mode property is Zoom which will make images larger on
the screen, but only within the confines of the picturebox control
that contains the image. If you want to magnify it more, you will need
to do the technique I mentioned earlier.

The difference between SizeMode Zoom and SizeMode Stretch is that Zoom
maintains the image's aspect ratio, Stretch does not.
Dec 7 '07 #4
On Fri, 07 Dec 2007 06:25:55 -0800, <za***@construc tion-imaging.comwrot e:
[...]
There is no builtin .NET code to do zooming, but it can be
accomplished by setting the Top and Left properties of the picturebox
to be outside of the form.
I think I would call that "panning". :)

The PictureBox does offer some minimal control over basic zooming
behavior. For anything more complicated than that, a custom control would
be required. Based on what little I know about WPF, using WPF is probably
the easiest way. But it wouldn't be hard to write a custom control that
handles it either.

Drawing oneself, you would presumably be using the Graphics.DrawIm age()
method to draw the bitmap on the screen, in the form. To scale (zoom)
and/or offset (pan) the drawing, you can simply provide destination
dimensions for the image that are different from the source dimensions
(zoom in, dimensions are larger, zoom out, smaller...pan down and/or
right, origin of destination is to the left or up from the visible origin
in the control, and vice a versa). Alternatively, one can modify the
effective viewport being used to draw by creating a new transformation
matrix and assigning it to the Transform property of the Graphics instance
being used to draw.

Of course, you also need to provide a UI to control zoom and pan. That's
an entirely separate matter. But a standard click-and-drag or
scrollbar-based UI is fairly straightforward .

Pete
Dec 7 '07 #5

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

Similar topics

3
23593
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 results of the picture half the size. The PHP I have installed support 1.62 or higher. And all I would like to do is take and image and make it fit a 3x3. Any suggestions to where I should read or look would be appreciated.
2
11775
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 browser is a lot of gobledygook. How can I ensure that the image displays correctly in the browser? Dim objStream Dim FilImage, FolImage, strFilImage Dim adTypeBinary adTypeBinary = 1 Set objStream = Server.CreateObject("ADODB.Stream")
4
13747
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 mostly scanned newspaper atricles which are too big to just display on a form so I need the zoom and scroll features. Im using access 2003
2
3833
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 database of images and associated details. I want to run the system on a machine with a dual-head video adapter and have the Access window, showing a form, on one screen and an image viewer program on the other (the 'other' will actually be a...
0
3360
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 script on the client looks something like this: VIEWER.GetImage("http://www.url.com/SomeImage.jpg") VIEWER.GetImage("http://www.url.com/SomeImage.tif")
5
6107
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 2003). The viewer seems to be a bit 'buggy', in that sometimes if you preview a tif image using the activex on a form, then goto another form, and then come back to preview the same image again on the first form, the preview no longer shows up...
1
1735
by: Kuldeep | last post by:
Hello All, Could you please give me some leads on building a Image Viewer in .NET or how to use Windows Picture and Fax Viewer. The actual purpose is to display the image in my web application on the fly. Regards Kuldeep
1
7151
by: zee | last post by:
hello Is it possible to use Document Image Viewer Control in ASP.NET(2.0) because 1. The IDE is not adding this component in the toolbox and 2. when i use it so it give me following error "ActiveX control 'ef347a62-ba21-42e4-94a0-1c0a6d7fdfe7' cannot be instantiated because the current thread is not in a single-threaded apartment."
3
2525
by: =?Utf-8?B?SlIx?= | last post by:
I would like to add text to an image. I have tried to use DrawString and it works on some images but on others it is very very small. I am pretty sure it has something to do with the size of the image but I have had varying results on multiple images. Is there anyway to make the text a fixed size on the image. Similar to putting a date on a photograph.
0
2361
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 the modes for the different files but I am unsure If someone could examine my code and assist in helping me solve my problem(s)
0
9531
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.