16,012,223 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by RKT S (Top 18 by date)
RKT S
26-Mar-11 0:24am
View
thanks manfred...it worked...i got the mistake...
RKT S
24-Mar-11 0:09am
View
hi manfred....i did the changes which you asked me to do... but still the watermark image is the one without logo on it... plz help and let me know if i am doing something wrong here.. the final function which i have used is
public Bitmap AddWatermark(Bitmap bImg, Bitmap logo)
{
Bitmap bmPhoto = bImg;
//bmPhoto.SetResolution(bImg.HorizontalResolution,bImg.VerticalResolution);
Graphics grPhoto = Graphics.FromImage(bmPhoto);
Bitmap imgWatermark=logo;
int wmWidth = imgWatermark.Width;
int wmHeight = imgWatermark.Height;
//Create a Bitmap based on the previously modified photograph Bitmap
ImageAttributes imageAttributes = new ImageAttributes();
ColorMap colorMap = new ColorMap();
colorMap.OldColor = Color.FromArgb(255, 0, 255, 0);
colorMap.NewColor = Color.FromArgb(0, 0, 0, 0);
ColorMap[] remapTable = { colorMap };
imageAttributes.SetRemapTable(remapTable, ColorAdjustType.Bitmap);
float[][] colorMatrixElements = {
new float[] {1.0f, 0.0f, 0.0f, 0.0f, 0.0f},
new float[] {0.0f, 1.0f, 0.0f, 0.0f, 0.0f},
new float[] {0.0f, 0.0f, 1.0f, 0.0f, 0.0f},
new float[] {0.0f, 0.0f, 0.0f, 0.3f, 0.0f},
new float[] {0.0f, 0.0f, 0.0f, 0.0f, 1.0f}};
ColorMatrix wmColorMatrix = new ColorMatrix(colorMatrixElements);
imageAttributes.SetColorMatrix(wmColorMatrix, ColorMatrixFlag.Default,ColorAdjustType.Bitmap);
grPhoto.DrawImage(imgWatermark, new Rectangle(0, 0, wmWidth, wmHeight), 0, 0, wmWidth, wmHeight, GraphicsUnit.Pixel, imageAttributes);
return bmPhoto;
}
RKT S
24-Mar-11 0:08am
View
Deleted
hi manfred....i did the changes which you asked me to do... but still the watermark image is the one without logo on it... plz help and let me know if i am doing something wrong here.. the final function which i have used is public Bitmap AddWatermark(Bitmap bImg, Bitmap logo) { Bitmap bmPhoto = bImg; int phWidth = bmPhoto.Width; int phHeight =bmPhoto.Height; //bmPhoto.SetResolution(bImg.HorizontalResolution,bImg.VerticalResolution); Graphics grPhoto = Graphics.FromImage(bmPhoto); Bitmap imgWatermark=logo; int wmWidth = imgWatermark.Width; int wmHeight = imgWatermark.Height; //Create a Bitmap based on the previously modified photograph Bitmap ImageAttributes imageAttributes = new ImageAttributes(); ColorMap colorMap = new ColorMap(); colorMap.OldColor = Color.FromArgb(255, 0, 255, 0); colorMap.NewColor = Color.FromArgb(0, 0, 0, 0); ColorMap[] remapTable = { colorMap }; imageAttributes.SetRemapTable(remapTable, ColorAdjustType.Bitmap); float[][] colorMatrixElements = { new float[] {1.0f, 0.0f, 0.0f, 0.0f, 0.0f}, new float[] {0.0f, 1.0f, 0.0f, 0.0f, 0.0f}, new float[] {0.0f, 0.0f, 1.0f, 0.0f, 0.0f}, new float[] {0.0f, 0.0f, 0.0f, 0.2f, 0.0f}, new float[] {0.0f, 0.0f, 0.0f, 0.0f, 1.0f}}; ColorMatrix wmColorMatrix = new ColorMatrix(colorMatrixElements); imageAttributes.SetColorMatrix(wmColorMatrix, ColorMatrixFlag.Default,ColorAdjustType.Bitmap); int xPosOfWm = ((phWidth - wmWidth) - 10); int yPosOfWm = 10; grPhoto.DrawImage(imgWatermark,new Rectangle(xPosOfWm, yPosOfWm, wmWidth, wmHeight), 0, 0,wmWidth,wmHeight,GraphicsUnit.Pixel,imageAttributes); return bmPhoto; }
RKT S
24-Mar-11 0:02am
View
Deleted
hi manfred....i did the changes which you asked me to do...
but still the watermark image is the one without logo on it...
plz help and let me know if i am doing something wrong here..
the final function which i have used is
public Bitmap AddWatermark(Bitmap bImg, Bitmap logo)
{
Bitmap bmPhoto = bImg;
int phWidth = bmPhoto.Width;
int phHeight =bmPhoto.Height;
//bmPhoto.SetResolution(bImg.HorizontalResolution,bImg.VerticalResolution);
Graphics grPhoto = Graphics.FromImage(bmPhoto);
Bitmap imgWatermark=logo;
int wmWidth = imgWatermark.Width;
int wmHeight = imgWatermark.Height;
//Create a Bitmap based on the previously modified photograph Bitmap
ImageAttributes imageAttributes = new ImageAttributes();
ColorMap colorMap = new ColorMap();
colorMap.OldColor = Color.FromArgb(255, 0, 255, 0);
colorMap.NewColor = Color.FromArgb(0, 0, 0, 0);
ColorMap[] remapTable = { colorMap };
imageAttributes.SetRemapTable(remapTable, ColorAdjustType.Bitmap);
float[][] colorMatrixElements = {
new float[] {1.0f, 0.0f, 0.0f, 0.0f, 0.0f},
new float[] {0.0f, 1.0f, 0.0f, 0.0f, 0.0f},
new float[] {0.0f, 0.0f, 1.0f, 0.0f, 0.0f},
new float[] {0.0f, 0.0f, 0.0f, 0.7f, 0.0f},
new float[] {0.0f, 0.0f, 0.0f, 0.0f, 1.0f}};
ColorMatrix wmColorMatrix = new ColorMatrix(colorMatrixElements);
imageAttributes.SetColorMatrix(wmColorMatrix, ColorMatrixFlag.Default,ColorAdjustType.Bitmap);
int xPosOfWm = ((phWidth - wmWidth) - 10);
int yPosOfWm = 10;
grPhoto.DrawImage(imgWatermark,new Rectangle(xPosOfWm, yPosOfWm, wmWidth, wmHeight), 0, 0,wmWidth,wmHeight,GraphicsUnit.Pixel,imageAttributes);
return bmPhoto;
}
RKT S
23-Mar-11 21:43pm
View
thnaks manfred...
RKT S
19-Mar-11 10:16am
View
john i have shorten the code now....plz have a look...here null value is getting populated in field b....
RKT S
19-Mar-11 7:35am
View
now i have shorten it...:)
RKT S
8-Feb-11 6:14am
View
i am trying to pass the value thru query string and no the id values start from 1..its not zero...
RKT S
8-Feb-11 4:24am
View
fine
RKT S
7-Feb-11 0:01am
View
thanks abhinav
RKT S
6-Feb-11 4:28am
View
hi, i have tried this also bt still its passing id as 0 only...dont knw wats the problem
RKT S
5-Feb-11 13:38pm
View
hi john,am trying to pass it thru sessions...bt it is always passing id value as 0 only...
RKT S
2-Feb-11 12:16pm
View
also manas i more problem s der tat wen am adding the checkbox and retreving images from database image content and checkbox merge in one column...so do hav any idea how to avoid this condition..
RKT S
2-Feb-11 12:10pm
View
hey manas..actually in an asp page i am displaying all the images stored in database in gridview and in this gridview i am attaching the checkbox and a delete button on the page..now the problem is with the way am retreiving the images from the database ...so can u help me with this i.e how to retreive image from database and display it in gridview
RKT S
2-Feb-11 11:48am
View
hey..actually in an asp page i am displaying all the images stored in database in gridview and in this gridview i am attaching the checkbox and a delete button on the page..now the problem is with the way am retreiving the images from the database ...so can u help me with this i.e how to retreive image from database and display it in gridview
RKT S
22-Jan-11 8:19am
View
everything is working fine..the only problem is when usertype is admin..reader returns a null value...
RKT S
21-Jan-11 10:21am
View
thanks Sandeep..it works..:)
RKT S
21-Jan-11 10:11am
View
actually i want to display an error message on my login page if the user enters invalid credentials..so can you help me with tht.??
Show More