Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee14-Oct-10 21:05
Alegria_Lee14-Oct-10 21:05 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos14-Oct-10 22:21
Ongcos14-Oct-10 22:21 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. [modified] Pin
Ongcos15-Oct-10 2:05
Ongcos15-Oct-10 2:05 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee15-Oct-10 3:06
Alegria_Lee15-Oct-10 3:06 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos17-Oct-10 22:51
Ongcos17-Oct-10 22:51 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee18-Oct-10 4:34
Alegria_Lee18-Oct-10 4:34 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos7-Nov-10 22:23
Ongcos7-Nov-10 22:23 
QuestiongetPixel problem c# Pin
badescuga14-Oct-10 6:55
badescuga14-Oct-10 6:55 
Hello!
I have a problem with getting the pixels from an image. I load a image, select a pixel from the image and retrieve it's color and then i generate a matrix indexMatrix[bitmap_height][bitmap_width] which contains 1 or 0 depending if the [x,y] color of the bitmap is the same as the color selected. The problem is that the program doesn't select all the pixels although it should. Here are some images of the bitmap and the bitmap generated from the matrix :

original:
http://img233.imageshack.us/i/hartap.jpg/
after matrix generation and the transform from the matrix to the new image
http://img826.imageshack.us/i/60079199.jpg


The wierd thing is that if i run my program for the new image ( the one constructed from the matrix ) it returns the same image( as it should ) but i can't figure out how to fix the problem.

Please Help!!!

Regards,
Alex Badescu
and some code from my project :



bitmap declaration:

m_Bitmap = (Bitmap)Bitmap.FromFile(openFileDialog.FileName, false);




Here i calculate the matrix:

int bitmapWidth = m_Bitmap.Width;
int bitmapHeight = m_Bitmap.Height;


indexMatrix = new int[bitmapHeight][];

if (imageIsLoaded && colorIsSelected)
{
for (int i = 0; i < bitmapHeight; i++)
{
indexMatrix[i] = new int[bitmapWidth];

for (int j = 0; j < bitmapWidth; j++)
{
Color temp = m_Bitmap.GetPixel(j, i);
if (temp == selectedColor)
indexMatrix[i][j] = 1;
else indexMatrix[i][j] = 0;


}
}
MessageBox.Show("matrix generated succesfully");
}
matrixIsCalculated = true;
}
AnswerRe: getPixel problem c# Pin
Rick Shaub14-Oct-10 7:11
Rick Shaub14-Oct-10 7:11 
GeneralRe: getPixel problem c# Pin
badescuga14-Oct-10 7:20
badescuga14-Oct-10 7:20 
AnswerRe: getPixel problem c# Pin
Luc Pattyn14-Oct-10 7:31
sitebuilderLuc Pattyn14-Oct-10 7:31 
QuestionRefresh User Control look Pin
Mazdak14-Oct-10 3:17
Mazdak14-Oct-10 3:17 
AnswerRe: Refresh User Control look Pin
Luc Pattyn14-Oct-10 3:35
sitebuilderLuc Pattyn14-Oct-10 3:35 
QuestionConvert color from RGB to Color name Pin
MrKBA14-Oct-10 0:22
MrKBA14-Oct-10 0:22 
AnswerRe: Convert color from RGB to Color name Pin
V.14-Oct-10 0:52
professionalV.14-Oct-10 0:52 
GeneralRe: Convert color from RGB to Color name Pin
MrKBA14-Oct-10 1:27
MrKBA14-Oct-10 1:27 
GeneralRe: Convert color from RGB to Color name Pin
V.14-Oct-10 1:35
professionalV.14-Oct-10 1:35 
GeneralRe: Convert color from RGB to Color name Pin
OriginalGriff14-Oct-10 1:48
mveOriginalGriff14-Oct-10 1:48 
GeneralRe: Convert color from RGB to Color name Pin
Luc Pattyn14-Oct-10 2:33
sitebuilderLuc Pattyn14-Oct-10 2:33 
GeneralRe: Convert color from RGB to Color name Pin
OriginalGriff14-Oct-10 3:46
mveOriginalGriff14-Oct-10 3:46 
AnswerRe: Convert color from RGB to Color name Pin
Keith Barrow14-Oct-10 1:56
professionalKeith Barrow14-Oct-10 1:56 
AnswerRe: Convert color from RGB to Color name Pin
PIEBALDconsult14-Oct-10 3:09
mvePIEBALDconsult14-Oct-10 3:09 
QuestionRe: Convert color from RGB to Color name Pin
Luc Pattyn14-Oct-10 3:33
sitebuilderLuc Pattyn14-Oct-10 3:33 
AnswerRe: Convert color from RGB to Color name Pin
PIEBALDconsult14-Oct-10 3:41
mvePIEBALDconsult14-Oct-10 3:41 
GeneralRe: Convert color from RGB to Color name Pin
Luc Pattyn14-Oct-10 3:59
sitebuilderLuc Pattyn14-Oct-10 3:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.