473,799 Members | 3,052 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

about image rotating

Hello all, how could I rotate a server side image in asp.net and show it in
web page? Thanks.

Jun 27 '08 #1
5 3453
Well, I'm not going to write the whole function for you, but you basically
need to create an *.aspx page that returns an image/gif. In the Load event,
you will simply use the classes in the System.Drawing namespace to rotate
it. If you have never created an *.aspx that returns an image/gif, you
basically use the Save() method of a Bitmap to output the image to the
Response.Output Stream like the following:

mybitmap.Save(R esponse.OutputS tream, ImageFormat.Gif )

I'm not going to going into the other details of the steps you will need to
take, but most of them are reasonably simple, and if you can find a good
website I think you'll be able to figure it out. Good Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Michael" <Mi**********@n oemail.noemailw rote in message
news:OK******** ******@TK2MSFTN GP02.phx.gbl...
Hello all, how could I rotate a server side image in asp.net and show it
in web page? Thanks.

Jun 27 '08 #2
Hi Michael,

From your description, you're wantting to display some image files(at
server-side) as rotated format on ASP.NET web page, correct?

If so, I think the proper means is use the .NET GDI+ classes to perform
transforming on the certain images. You can generate an rotated image
stream and output it on page(via an httphander or page...)

Here are some good web articles which has introduced some code and examples
on GDI+ image transformation:

#Matrix Transformation of Images in C#, using .NET GDI+
http://www.codeproject.com/KB/GDI-pl...formation.aspx

#Image Transformation in C# with GDI+
http://www.c-sharpcorner.com/UploadF...04121920050548
03AM/Transformations 04.aspx

#NET and GDI+: Transforming Images on the Server - Introduction and
Examples, Part II...
http://www.dotnetjohn.com/articles.aspx?articleid=115

Also, if you're not familar with emiting image stream via httphandler in
ASP.NET, here are some tech articles on this:

http://www.codeproject.com/KB/web-im...umbnailer.aspx

http://www.c-sharpcorner.com/UploadF...rImages1115200
5062705AM/HTTPHandlersFor Images.aspx

http://msdn.microsoft.com/en-us/magazine/cc163988.aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Reply-To: "Michael" <Mi**********@n oemail.noemail>
From: "Michael" <Mi**********@n oemail.noemail>
Subject: about image rotating
Date: Tue, 24 Jun 2008 09:51:42 +0800
>
Hello all, how could I rotate a server side image in asp.net and show it
in
>web page? Thanks.

Jun 27 '08 #3
On Jun 24, 3:48 pm, stch...@online. microsoft.com (Steven Cheng [MSFT])
wrote:
Hi Michael,

From your description, you're wantting to display some image files(at
server-side) as rotated format on ASP.NET web page, correct?

If so, I think the proper means is use the .NET GDI+ classes to perform
transforming on the certain images. You can generate an rotated image
stream and output it on page(via an httphander or page...)

Here are some good web articles which has introduced some code and examples
on GDI+ image transformation:

#Matrix Transformation of Images in C#, using .NET GDI+http://www.codeproject.com/KB/GDI-pl...formation.aspx

#Image Transformation in C# with GDI+http://www.c-sharpcorner.com/UploadF...mations0412192...
03AM/Transformations 04.aspx

#NET and GDI+: Transforming Images on the Server - Introduction and
Examples, Part II...http://www.dotnetjohn.com/articles.aspx?articleid=115

Also, if you're not familar with emiting image stream via httphandler in
ASP.NET, here are some tech articles on this:

http://www.codeproject.com/KB/web-im...umbnailer.aspx

http://www.c-sharpcorner.com/UploadF...dlersForImages...
5062705AM/HTTPHandlersFor Images.aspx

http://msdn.microsoft.com/en-us/magazine/cc163988.aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer tohttp://msdn.microsoft. com/subscriptions/managednewsgrou ps/default.asp...
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) athttp://msdn.microsoft. com/subscriptions/support/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Reply-To: "Michael" <Michael_M...@n oemail.noemail>
From: "Michael" <Michael_M...@n oemail.noemail>
Subject: about image rotating
Date: Tue, 24 Jun 2008 09:51:42 +0800
Hello all, how could I rotate a server side image in asp.net and show it
in
web page? Thanks.
if you just want to rotate or flip it by the standard 90/180/270 then
you could try

System.Drawing. Image image =
System.Drawing. Image.FromFile( fileInPath);
image.RotateFli p(RotateFlipTyp e.xxxxx);
image.Save(file OutPath)
Jun 27 '08 #4
Thanks to everyone's response and informaton. Image.RotateFli p resolved the
issue.

"densial" <de*****@gmail. comwrote in message
news:89******** *************** ***********@i18 g2000prn.google groups.com...
On Jun 24, 3:48 pm, stch...@online. microsoft.com (Steven Cheng [MSFT])
wrote:
>Hi Michael,

From your description, you're wantting to display some image files(at
server-side) as rotated format on ASP.NET web page, correct?

If so, I think the proper means is use the .NET GDI+ classes to perform
transforming on the certain images. You can generate an rotated image
stream and output it on page(via an httphander or page...)

Here are some good web articles which has introduced some code and
examples
on GDI+ image transformation:

#Matrix Transformation of Images in C#, using .NET
GDI+http://www.codeproject.com/KB/GDI-pl...formation.aspx

#Image Transformation in C# with
GDI+http://www.c-sharpcorner.com/UploadF...mations0412192...
03AM/Transformations 04.aspx

#NET and GDI+: Transforming Images on the Server - Introduction and
Examples, Part II...http://www.dotnetjohn.com/articles.aspx?articleid=115

Also, if you're not familar with emiting image stream via httphandler in
ASP.NET, here are some tech articles on this:

http://www.codeproject.com/KB/web-im...umbnailer.aspx

http://www.c-sharpcorner.com/UploadF...dlersForImages...
5062705AM/HTTPHandlersFor Images.aspx

http://msdn.microsoft.com/en-us/magazine/cc163988.aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microso ft.com.

============== =============== =============== ======
Get notification to my posts through email? Please refer
tohttp://msdn.microsoft. com/subscriptions/managednewsgrou ps/default.asp...
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS)
athttp://msdn.microsoft. com/subscriptions/support/default.aspx.
============== =============== =============== ======
This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
>Reply-To: "Michael" <Michael_M...@n oemail.noemail>
From: "Michael" <Michael_M...@n oemail.noemail>
Subject: about image rotating
Date: Tue, 24 Jun 2008 09:51:42 +0800
>Hello all, how could I rotate a server side image in asp.net and show it
in
>web page? Thanks.

if you just want to rotate or flip it by the standard 90/180/270 then
you could try

System.Drawing. Image image =
System.Drawing. Image.FromFile( fileInPath);
image.RotateFli p(RotateFlipTyp e.xxxxx);
image.Save(file OutPath)
Jun 27 '08 #5
Thanks for your quick reply Michael,

I'm glad that it helps you. If you need any further help, welcome to post
here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

--------------------
>Reply-To: "Michael" <Mi**********@n oemail.noemail>
From: "Michael" <Mi**********@n oemail.noemail>
>In-Reply-To:
<89************ *************** *******@i18g200 0prn.googlegrou ps.com>
>Subject: Re: about image rotating
Date: Tue, 24 Jun 2008 15:34:46 +0800
>
Thanks to everyone's response and informaton. Image.RotateFli p resolved
the
>issue.

"densial" <de*****@gmail. comwrote in message
news:89******* *************** ************@i1 8g2000prn.googl egroups.com...
>On Jun 24, 3:48 pm, stch...@online. microsoft.com (Steven Cheng [MSFT])
wrote:
>>Hi Michael,

From your description, you're wantting to display some image files(at
server-side) as rotated format on ASP.NET web page, correct?

If so, I think the proper means is use the .NET GDI+ classes to perform
transformin g on the certain images. You can generate an rotated image
stream and output it on page(via an httphander or page...)

Here are some good web articles which has introduced some code and
examples
on GDI+ image transformation:

#Matrix Transformation of Images in C#, using .NET
GDI+http://www.codeproject.com/KB/GDI-pl...formation.aspx

#Image Transformation in C# with
GDI+http://www.c-sharpcorner.com/UploadF...mations0412192...
>>03AM/Transformations 04.aspx

#NET and GDI+: Transforming Images on the Server - Introduction and
Examples, Part
II...http://www.dotnetjohn.com/articles.aspx?articleid=115
>>>
Also, if you're not familar with emiting image stream via httphandler in
ASP.NET, here are some tech articles on this:

http://www.codeproject.com/KB/web-im...umbnailer.aspx

http://www.c-sharpcorner.com/UploadF...dlersForImages...
5062705AM/HTTPHandlersFor Images.aspx

http://msdn.microsoft.com/en-us/magazine/cc163988.aspx

Hope this helps.

Sincerely,

Steven Cheng
Jun 27 '08 #6

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

Similar topics

3
2839
by: fdsl ysnh | last post by:
--- python-list-request@python.orgдµÀ: > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit > http://mail.python.org/mailman/listinfo/python-list > or, via email, send a message with subject or body > 'help' to
5
2102
by: John | last post by:
I am rotating images at one location of my web site. My problem is if I set the width and height of the new image before I show the new image, the old image is stretched first to the new image dimensions, and if I show the new image before setting its dimensions, the new image is stretched first to the old image dimension before it is adjusted to its own dimension. I would like to load a new image with its own dimension at the same time....
1
2108
by: Grunt | last post by:
Hi, I have been trying to put together a rotating banner. the code works but I am having a problem with the caching of the banner images. no matter what I try the page is constantly reloading the images, even worse they are not loading completely. This version includes a (vain) attempt at forcing the banner images to cache. Apart form the caching problem the scripting seems to work Any help welcomed:
14
6564
by: mikeoley | last post by:
Why would this script below work on an html page: http://www.eg-designdev.com/aircylinders/test.htm But not a java page such as this: "http://www.eg-designdev.com/aircylinders/index3.jsp" Or does anybody have a simple slide show rotation script they could refer me to...thanks. <HTML><HEAD>
5
2552
by: Ricardo Furtado | last post by:
I'm trying, for a week or two, to create a procedure in order to rotate the image in any picturebox control in a cephalometry software. I've found a web site that shows how that can be done: http://vb-helper.com/index_vbnet.html but the problem is that the image doesn't stay at the top, instead, the image is created upon another bitmap, even larger, and at its right corner. I've already tryed to cut the right corner, with the right...
9
6838
by: Kraken | last post by:
Hi, i have an assignment to open PPM images and prompt the user for either brightening, flipping or rotating the image. Ive done the brightening and flipping, but i cant get the rotating to work. When i try to rotate i get an error, although i think the concept is right. With some testing i figured out thet I get the error when x = 4 and y = 1 i think. Memory read access violation or something. Im using Visual C++ 2005 express edition and...
1
1818
by: kennykenn | last post by:
Im having trouble startin to develop a rotating image banner, I have coded part of it (only pulling image from a db). My aim is to print an image to part of my web page, allow it to screen for x amout of time and then i need a function to show the image dissolving, flipping or an effect similar to then appear with the next image and so on. Could ne1 help?!?
6
3229
by: swethak | last post by:
Hi, I displayed the image taken from database.How to raotate that image using javascript.plz tell that how to start the logic.plz tell that some reference websites.
0
1728
by: harryusa | last post by:
I am experimenting with the rotate function and so far I can't get my code to return anything but the URL of my script. Here it is: <?php // The file you are rotating $image = 'halloween.jpg'; //How many degrees you wish to rotate $degrees = 180;
0
9687
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
9541
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,...
1
10225
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
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...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
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();...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
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.