PC Review


Reply
Thread Tools Rate Thread

Best way to print high resolution images

 
 
moondaddy
Guest
Posts: n/a
 
      11th Aug 2004
I have an application where I need to print images where the size has been
reduced down to a fraction of a thumbnail and the original image is several
inches high and wide. We're using a special printing process where the dpi
is 2000x2000 or higher, therefore, when I reduce the size of the image, I
don't want to loose any pixels. In other words, if the image is 200 px by
200 px and I reduce the size down to 1/4 inch, I want the printer to still
read all 200x200 pixels.

The images are located on a remote web server so I can use asp.net, sql
server reporting services, or a winforms app using web services. I don't
want to use crystal reports. Can anyone recommend a good method to do this?

Thanks.

--
(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Peter Huang
Guest
Posts: n/a
 
      12th Aug 2004
Hi,

I think once an image has been resized to a lower resolution one, it can
not be restored, because the color information has lost.
For your scenario, I think you may try to use the method below to generate
the thumbnail dynamically.
public bool ThumbnailCallback()
{
return false;
}

private void Form1_Load(object sender, System.EventArgs e)
{
Image img = Image.FromFile(@"c:\Test\TestPIC\a.bmp");
this.pictureBox1.Image = img;
Image.GetThumbnailImageAbort myCallback =
new Image.GetThumbnailImageAbort(ThumbnailCallback);
this.pictureBox2.Image =
img.GetThumbnailImage(32,32,myCallback,IntPtr.Zero);
}

Image.GetThumbnailImage Method
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdrawingimageclassgetthumbnailimagetopic.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      12th Aug 2004
Moondaddy,

To add something to the nice answer from Peter here a sample to make a
thumbnail in VBNet.

Dim fo As New OpenFileDialog
If fo.ShowDialog = DialogResult.OK Then
PictureBox1.Image = PictureBox1.Image.FromFile(fo.FileName)
Dim Thumbnail As System.drawing.Image = _
PictureBox1.Image.GetThumbnailImage(32, 32, Nothing, New IntPtr)
PictureBox2.Image = Thumbnail
End If

Just a little thing to help more

Cor


 
Reply With Quote
 
moondaddy
Guest
Posts: n/a
 
      13th Aug 2004
Thanks Peter and Cor.

I would like to clarify on a few things. Does this method maintain the same
number of pixels in the image even though it was shrunk from 200X200 pixels
to 32X32 pixels for example?

Your examples use the picturebox control. Since I need to create some sort
of dynamic report (I could have 5 or 500 tiny images on a page) using these
high resolution images, a winform with picture boxes wont work. I need to
use a reporting app like sql server reporting services, or possible an
asp.net page with a datagrid or something (however printing from a web page
may not be too elegant). We need to print these tiny image using a special
printer and paper for our process, so having precision control over the
layout is important.

any more feedback would be most appreciated.




--
(E-Mail Removed)
"Cor Ligthert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Moondaddy,
>
> To add something to the nice answer from Peter here a sample to make a
> thumbnail in VBNet.
>
> Dim fo As New OpenFileDialog
> If fo.ShowDialog = DialogResult.OK Then
> PictureBox1.Image = PictureBox1.Image.FromFile(fo.FileName)
> Dim Thumbnail As System.drawing.Image = _
> PictureBox1.Image.GetThumbnailImage(32, 32, Nothing, New IntPtr)
> PictureBox2.Image = Thumbnail
> End If
>
> Just a little thing to help more
>
> Cor
>
>



 
Reply With Quote
 
Peter Huang
Guest
Posts: n/a
 
      13th Aug 2004
Hi,

GetThumbnailImage will not maintain the original resolution.
e.g.
image2 = image1.GetThumbnailImage

the image1 is 1024X768 while the image2 is 32X32.
Then after print, the image1 will be of 1024X768, while the image2 will be
of 32X32.

So for you scenario, I think we have to maintain two copies for one image,
one is the tiny version for display, and the other is the original version
for print.
By using the GetThumbnailImage, we do not need to store two copies, as we
can generate the tiny version every time we call the GetThumbnailImage.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
moondaddy
Guest
Posts: n/a
 
      13th Aug 2004
Thanks Peter but I failed to communicate what I'm trying to do. The small
images are not for viewing. The small images are what I want to print. I
need to print tiny images at very high resolution. We are producing a
product that has small images on it and we have a printing process that can
produce high resolution detail on very small images. This is why I want to
reduce the size of the image while maintaining high resolution such as 600
dpi or higher.

--
(E-Mail Removed)
""Peter Huang"" <v-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> GetThumbnailImage will not maintain the original resolution.
> e.g.
> image2 = image1.GetThumbnailImage
>
> the image1 is 1024X768 while the image2 is 32X32.
> Then after print, the image1 will be of 1024X768, while the image2 will be
> of 32X32.
>
> So for you scenario, I think we have to maintain two copies for one image,
> one is the tiny version for display, and the other is the original version
> for print.
> By using the GetThumbnailImage, we do not need to store two copies, as we
> can generate the tiny version every time we call the GetThumbnailImage.
>
> Best regards,
>
> Peter Huang
> Microsoft Online Partner Support
>
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>



 
Reply With Quote
 
Peter Huang
Guest
Posts: n/a
 
      16th Aug 2004
Hi,

You may try to draw the image as a small size, but the original image needs
high resolution.
Image img;
private void Form1_Load(object sender, System.EventArgs e)
{
this.pictureBox1.Image =img;
}

private void pictureBox2_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
if (img !=null)
e.Graphics.DrawImage(img,0,0,32,32);
}

Is this what you want?

I am not sure your scenario, but I think when we print we can just print
the image of high resolution to get the good print effect.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
High resolution screen = almost pixelated images Ben Windows XP Internet Explorer 4 4th Nov 2005 08:51 PM
High resolution images in VB.NET Johnny Granberg Microsoft VB .NET 1 25th Aug 2004 04:06 PM
printing high resolution images Matt McLean Windows XP Internet Explorer 1 15th Jun 2004 06:07 AM
ImageList for high-resolution images?? Vaughn Microsoft C# .NET 6 13th Apr 2004 04:36 AM
exporting charts as high resolution images Paul Microsoft Excel Charting 8 28th Oct 2003 07:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:57 AM.