CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 6/20/2004 9:47:42 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 28 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
gamania
Asp.Net User
How do I set image width/height generated by imagegenerator programatically in imagegenerator code?6/20/2004 9:47:42 PM

0/0

I tried DefaultWidth and DefaultHeight, it's read-only. The returned image is stuck at 250x250.
Fredrik N
Asp.Net User
Re: How do I set image width/height generated by imagegenerator programatically in imagegenerator code?6/21/2004 4:11:36 AM

0/0

As you may know the ImageGenerator is a base class so you have to override the DefaultHeight and Width to make it possible to change the values:


<%@ Image Language="C#" Class="Image" %>

using System;
using System.Drawing;

public class Image : System.Web.UI.Imaging.ImageGenerator {

protected override void RenderImage (Graphics g)
{
g.FillRectangle(Brushes.Blue, 0, 0, 300, 400);
g.DrawString("Hello World", new Font("Verdana", 12), Brushes.White, 0, 0);
}

protected override int DefaultHeight
{
get { return 400; }
}

protected override int DefaultWidth
{
get { return 300; }
}
}



/Fredrik Norm?n NSQUARED2
Microsoft MVP, MCSD, MCAD, MCT

Cornerstone

My Blog, ASP.Net 2.0 etc
gamania
Asp.Net User
Re: How do I set image width/height generated by imagegenerator programatically in imagegenerator code?6/21/2004 2:54:59 PM

0/0

Never thought about it this way, thanks a lot.
shud
Asp.Net User
Re: How do I set image width/height generated by imagegenerator programatically in imagegenerator code?7/22/2004 11:17:36 AM

-1/1


You can also override CreateImage:

protected override Image CreateImage(int width, int height)
{
width = myWidthValue;
height = myHeightValue;

return base.CreateImage(width, height);
}

You could get these values from Request or from Context.Session etc...

Steve
guenavan
Asp.Net User
Re: How do I set image width/height generated by imagegenerator programatically in imagegenerator code?11/21/2006 10:36:25 AM

0/0

As I understood correctly [1], the images used in webapplication should be quantized using safe palette  (240 colors) [2]

[1]
Morgan Skinner
Optimizing Color Quantization for ASP.NET Images
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/colorquant.asp
[2]
Robert Hess
The Safety Palette
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/html/safety.asp


Guennadi Vanine - Gennady Vanin - ???????? ?????
guenavan
Asp.Net User
Re: How do I set image width/height generated by imagegenerator programatically in imagegenerator code?11/21/2006 10:37:53 AM

0/0

As I understood correctly [1], the images used in webapplication should be quantized using safe palette  (240 colors) [2]

BTW does anybody know how to reproduce ImageGenerator functionality since it was excluded from ASP.NET 2.0? 

[1]
Morgan Skinner
Optimizing Color Quantization for ASP.NET Images
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/colorquant.asp
[2]
Robert Hess
The Safety Palette
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/html/safety.asp


Guennadi Vanine - Gennady Vanin - ???????? ?????
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
SOLPARTMENU: tabbed like menu - ng.asp-net-forum.dotnetnuke - fix ... how do i set image width/height generated by imagegenerator programatically in imagegenerator code? need help building a control ...
ASP.NET : Dynamic Image control Height - Height of the image . Width- Width of the image ... The image generator takes a string and creates an image that represents it. ...
Winning Forms: Practical Tips For Boosting The Performance Of ... Component code generated by the Windows Forms designer starts with ... Setting panel1.Width and then panel1.Height causes twice the work of setting them ...
CodeProject: ASCII Art Generator. Free source code and programming ... Width, resizedImage.Height); // Set up the image transformation parameters. ..... powerful and feature-rich ASCII image generator, with full source in C#. ...
Csharp (DigitalColony.com) FreeTextBox(); string html = "

Free gsms activex control 3.0 Download - gsms activex control 3.0 ... Bokai barcode image generator ActiveX control is a barcode control that can be .... such as images width and height, size of the image file, the number of ...
Software Download: Barcode Label Printing Software User can set the page, label and page margins print the several barcode and text ... UPC Barcode label image generator and inventory labeling software ...
TheMSsForum.com >> Csharp >> Moving objects - The Microsoft ... Interview Questions Feb 24, 2006 What is Native Image Generator (Ngen.exe)? ..... because the resizing isn't always on a factor of the height or width. ...
SkyView in a Jar An image generator class can be specified in lieu of a list of ..... when they are to be generated programmatically rather than listed explicitly. ...
Manipulating text and graphic appearance - Patent 7227551 5490246, Image generator using a graphical flow diagram with automatic .... a maximum width of any one of the one or more inside regions; and setting the ...





Search This Site:










remote access of dnn

preventing multiple logins?

problem with the admin tab "tabs" with dnn 2.1.2

single value addition to dropdownlist

newbie encryption question

passing parametes in maildefinition..bodyfilename

creating login w/ membership roles in microsoft access...

3.0.10 added feature...

extend datagrid by wrapping with another control

saving stream as image file

discussion list

add to database via textbox

magic.tablink

security using roles and windows authenication

httpcontext.current

formal justification for using css-friendly control adapters

reload the datagrid?

forum or discussion area ?

treeview directory structure

online help

rssdatasource control

how do you ftp just compiled files to the server?

repeater

windows and forms authentication

v3.1.1 fresh install error with getportalsettings

change container caption at run time

containter not expanding to fit module

checkboxes in asp.net 2.0 menu control

any idea why my date string is being converted to chinese characters?

disable viewstate in callbacks ?

 
All Times Are GMT