Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, December 23, 2008 11:11:45 PM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


hello,

My application is a Windows based application using C#.net 2008 and framework is 3.5 and lead tools (version 16).i want to display the histogram of corresponding message.In some message, it is woking.But the Histogram is balk only.i attched the scrrenshot.Any namespce is added for that?

regards,

Dileep

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, December 24, 2008 5:28:35 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Dileep,

What is the exact histogram function that you?

Also, it seems you forgot to attach the Screenshot image, can you please reattach it?

Note: when you want to attach any files, please put them all in ZIP or RAR file. Also, don't use preview when you have attachment.
If you have any problem in attaching files to the forum, you can send the files in a ZIP of RAR file to support@leadtools.com. Don't forget to mention this forum post in your email to support.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Friday, December 26, 2008 12:19:08 AM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


attchement here.
ssskkk attached the following image(s):
Histogram.JPG
 
#4 Posted : Saturday, December 27, 2008 11:05:06 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Dileep,

What is the exact histogram function that you?

Can you reproduce the same issue using one of LEADTOOLS demos that ship with the LEADTOOLS SDK?

If yes, please provide me with the steps to reproduce this issue using LEADTOOLS demo.

If no, please send me a small working project (not your full application) that demonstrates this issue, so that I can investigate this issue further.

Thanks,
Maen Badwan
LEADTOOLS Technical Support

 
#5 Posted : Sunday, December 28, 2008 8:19:51 PM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


it is not produce ur application

In my application , the rasterthumbnailBrowser shows a lot of message. when i select any image from  rasterthumbnailBrowser , it will show the rasterimageviewer and the corresponding histogram produced. In some cases ,jpg like image as we select in rasterthumbnailbrowser,it will show in the

raster image viewr and the corresponding histogram as black rectangle

i wrote the code in rasterThumbnailBrowser1_SelectedIndexChanged

try

{

RasterImageListItemCollection selectedItems = rasterThumbnailBrowser1 .SelectedItems;

if (selectedItems.Count > 0)

{

bSelectimage = true;

item = selectedItems[selectedItems.Count - 1];

if (item.FileName != _currentFileName)

{

_currentFileName = item.FileName;

rasterImageViewer1.Image = rasterThumbnailBrowser1.Codecs.Load(

_currentFileName,

0,

CodecsLoadByteOrder.BgrOrGray,

item.Page,

item.Page);

rasterImageViewer2.Image = rasterThumbnailBrowser1 .Codecs.Load(

_currentFileName,

0,

CodecsLoadByteOrder.BgrOrGray,

item.Page,

item.Page);

rasterImageViewer3.Image =rasterThumbnailBrowser1 .Codecs.Load(

_currentFileName,

0,

CodecsLoadByteOrder.BgrOrGray,

item.Page,

item.Page);

}

}

else

{

rasterImageViewer1.Image = null;

_currentFileName = null;

}

}

catch

{

rasterImageViewer1.Image = null;

}

///It is  added the below statement.

/////its for display histogram when selection index changed.

bSelectimage = true;

lblHistogram.Invalidate(null, true);

I write the code for display histogram

int i = 0;

_histogramCommand.Channel = (HistogramCommandFlags)0;

.

if (bSelectimage == true)

{

rasterImageViewer1.Image = codecs.Load(item.FileName);

tempimage = rasterImageViewer1.Image;

}

//tempimage = item.Image;

//Assign rasterImageViewer1.Image or item.Image to tempimage.

//depend on show histogram.

 

_histogramCommand.Run(tempimage);

//

SetlabelValues();

_maximumHistogramValue = _histogramCommand.Histogram[0];

// _lblHistogram.Invalidate(null, true);

//Dileep _lblHistogram.Invalidate(null, true); is commented otherwise it is working and but not woking in

//Colour Section.

Pen pen;

switch (_cbChannel.SelectedIndex)

{

case 1:

pen = new Pen(Color.Red, 2);

break;

case 2:

pen = new Pen(Color.Green, 2);

break;

case 3:

pen = new Pen(Color.Blue, 2);

break;

default:

pen = new Pen(Color.Black, 2);

break;

}

e.Graphics.Clear(SystemColors.Control);

float yViewValue;

float xViewValue;

int[] histogramValues = _histogramCommand.Histogram;

Point previousPoint = new Point(0, _lblHistogram.Height);

int index;

for (index = 0; index < 256; index++)

{

if (_numUDClipping.Value != 100)

yViewValue = (float)Math.Min(_lblHistogram.Height, (histogramValues[index] / ((1.0 - (float)_numUDClipping.Value / 100.0) * _maximumHistogramValue)) * _lblHistogram.Height + 0.5);

else

yViewValue = _lblHistogram.Height;

xViewValue = index * 2;

if (_cbView.SelectedIndex == 0)

e.Graphics.DrawLine(pen, xViewValue, _lblHistogram.Height, xViewValue, _lblHistogram.Height - yViewValue);

else

{

Point currectPoint = new Point(0);

currectPoint.X = (int)xViewValue;

currectPoint.Y = (int)(_lblHistogram.Height - yViewValue);

e.Graphics.DrawLine(pen, previousPoint, currectPoint);

previousPoint = currectPoint;

}

}

}

regards,

Dileep

 
#6 Posted : Tuesday, December 30, 2008 2:19:56 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Dileep,

I didn't check this issue using your code, because there are some missing variables and controls in your code. For example, you are checking the value of _numUDClipping control. What is this control?

Anyway, I created a small project (based on your code) that draws the histogram of any 24-bit image and didn't notice the problem.
If the attached project doesn't show the problem, please modify the project code to show the problem and send me the modified project.

Please check the same issue using the attached project and let me know how it goes.
 
Thanks,
Maen Badwan
LEADTOOLS Technical Support
File Attachment(s):
CsTestHistogram16.zip (10kb) downloaded 17 time(s).
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.073 seconds.