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 : Friday, July 10, 2009 3:01:21 AM(UTC)

Blazej  
Blazej

Groups: Registered
Posts: 11


I discovered that when the RasterThumbailsBrowser load the images in following way
_browserWorkingCopy.LoadThumbnails("c:\\tifs", "*.*", RasterThumbnailBrowserLoadFlags.None);

the images quality is very good.

I need to load TIFF document from URL so I do following things.

Load the image from url to raster image object
_rasterImage = _codecs.Load(uriPath);

and then I add the pages manually to raster thumbnails browser, what cause that quality is very poor and I really do not know what is wrong.

Please give me some advice it is very important for me.

Thank you in advance
Blazej

 

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 : Sunday, July 12, 2009 6:09:55 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

Blazej,
You can use the RasterCodecs.Load(URI) method to load the image from a web server. You can then use SizeCommand class to reduce its size to become a thumbnail.

If this doesn't solve the problem, please tell me what you mean by "quality is very poor" exactly. Can the problem be seen using any of our demos and the images that ship with our toolkit? If yes, please give me detailed steps.

 
#3 Posted : Sunday, July 12, 2009 11:41:31 AM(UTC)

Blazej  
Blazej

Groups: Registered
Posts: 11


I do as you wrote, I use RasterCodec.Load(uri) and then I add the pages using
RasterThumbnailBrowser.Items.Add(RasterImageListItem)

I can not resize pages because I need to display it in RasterImageViewer with real size.

Problem is that when I use above method the thumbnails quality is not so good as when I load the thumbnails using LoadingThumbnail() on RasterThumbnailBrowser object.

I attachment you can find example tiff document so you can compare easily difference in quality for that to loading ,methods.

Best Regards
Blazej


[Attachment moved to Ticket#: 2009071210000395 by moderator]
 
#4 Posted : Monday, July 13, 2009 12:09:18 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

Blazej,
The attached image does not explain what you want. It only shows images of ID cards for 2 different people.

If you would like me to check the issue for you, please do one of 2 things:
1. Either explain how to see the problem using one of our demos (detailed steps).
2. Or create a small sample project (NOT your full application) and put it in a ZIP or a RAR file, then post it here or send it to support@leadtools.com and mention this forum post.
 
#5 Posted : Monday, July 13, 2009 1:56:21 AM(UTC)

Blazej  
Blazej

Groups: Registered
Posts: 11


Ok, load file I have provided in previous post to your example application ThumbnailBrowserDemo and see how it looks in RasterThumbnailsBrowser.

Now use example application, provided by me and see how poor is the quality of this image.

I attached in the zip file also print screen with comparison how looks my Tif in your application an in mine.

Obviously add the references ti Lead libraries.
Regards
Blaise
 
#6 Posted : Monday, July 13, 2009 1:59:17 AM(UTC)

Blazej  
Blazej

Groups: Registered
Posts: 11


Problem with attaching example files.
 
#7 Posted : Monday, July 13, 2009 2:00:29 AM(UTC)

Blazej  
Blazej

Groups: Registered
Posts: 11


Cannot attach project, so below is whole code for my example project.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Leadtools.WinForms;
using Leadtools.Codecs;
using Leadtools;

namespace Quality
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
Uri u = new Uri("http://projekty.mm.com.pl/data/leadcontrol/quality.tif");

RasterCodecs.Startup();
RasterCodecs codec = new RasterCodecs();
RasterImage image = codec.Load(u);
RasterThumbnailBrowser browser = new RasterThumbnailBrowser();
RasterImageListItem rili = new RasterImageListItem(image, 1, "quality.TIF");
browser.Items.Add(rili);
this.Controls.Add(browser);



}
}
}
Blazej attached the following image(s):
quality_comparision.JPG
 
#8 Posted : Monday, July 13, 2009 4:50:14 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

Blazej,
Set the paint properties for browser before you add the thumbnail to it like this:

RasterPaintProperties p = new RasterPaintProperties();
p.PaintDisplayMode = RasterPaintDisplayModeFlags.Resample;
p.PaintEngine = RasterPaintEngine.GdiPlus;
p.UsePaintPalette = true;
browser.PaintProperties = p;

This will give you good quality images as in our demo.
Please note that this will not work with 1-bit black and white (bitonal) images, because the Resample display mode doesn't work with this type of images.
For such images, you need the ScaleToGray display mode, which requires a LEADTOOLS Document Imaging toolkit.

About attachments, put them in a ZIP or a RAR file and do not use the preview feature.
Also, make sure you delete all unneeded files such as DLLs and Visual Studio-generated files before you attach the file.
 
#9 Posted : Monday, July 13, 2009 4:58:51 AM(UTC)

Blazej  
Blazej

Groups: Registered
Posts: 11


Your code do not help me:( Nothing change...

I try to attach my project without any generated files.

It is extremely important for me and I need to solve that problem.

Regards
Blaise

 
#10 Posted : Monday, July 13, 2009 5:01:01 AM(UTC)

Blazej  
Blazej

Groups: Registered
Posts: 11


(can not attach example project) Please test the code which I paste in previous post and make the tests. I can also send you the example project via mail, but I don not have your mail.
 
#11 Posted : Monday, July 13, 2009 6:33:35 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

I tested using your code, and added the code above to it, so it worked correctly.

I'm attaching the project I created.
File Attachment(s):
Quality.zip (14kb) downloaded 25 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-2024, Yet Another Forum.NET
This page was generated in 0.137 seconds.