create image from pixel value problem in

Posted by Gopal_nivas under ASP.NET on 11/4/2011 | Points: 10 | Views : 2271 | Status : [Member] | Replies : 0
i was creating image using pixels and place the converted pixel image into a pdf using itextsharp.
but the problem i am facing is i have high resolution image and i converted that image into i pixel value and from that pixel value i was generating image and place that image into itextsharp pdf. but the pixel converted image is not like the original image. its having resolution problem.

how to tackle this.

the below code is the conversion of pixel to image:
private static Bitmap returnBitMap(string sPixelData, Bitmap oBitmap, int iWidth, int iHeight)
string sCurrentPixelColor = String.Empty;

if (sPixelData != String.Empty)
oBitmap = new Bitmap(iWidth, iHeight);

int i = 0;
for (int ix = 0; ix < iHeight; ix++)
for (int iy = 0; iy < iWidth; iy++)
sCurrentPixelColor = sPixelData.Substring(i * 6, 6);
oBitmap.SetPixel(iy, ix, ColorTranslator.FromHtml("0x" + sCurrentPixelColor));

return oBitmap;

so how to handle this..

need ur suggestions with examples.



(No response found.)

Login to post response