Solved

Perl/Tk Pictures with Color Gradient show patterns like waves or lines instead of a smooth surface

Posted on 2006-06-15
5
269 Views
Last Modified: 2008-03-17
Hello,
the wheather I use JPEG, GIF or PNG they all show some kind of interference pattern in Tk.
When looking at them with the Microsoft Photo Editor they are smooth.
Is there something I can do about it?
Thank you very much!
petece
0
Comment
Question by:petece
5 Comments
 
LVL 9

Assisted Solution

by:Suhas .
Suhas . earned 100 total points
Comment Utility
i used pic in my script and it showing fine without any lines or waves and i used the following code for placing an image.


my $canvas = $mw->Canvas(-height     => 50,
                         -width      => 200,
                         -background => 'firebrick4'
                        );
place_image($canvas, "abc.gif",95,25);
$canvas->pack();


sub place_image {
    my ($container,$file,$x,$y) = @_;

    my $photo = $container->Photo(-file => $file);
    my $image = $container->createImage($x,$y, -image => $photo);
}

0
 

Author Comment

by:petece
Comment Utility
Thank you! I tried your code (which does what mine did but yours look more elegant),
but the interference patterns are still there.
Even adding     ", -palette => 255/255/255" as a param. to Photo method  and
using " $photo->redither" did not change anything.



0
 
LVL 39

Assisted Solution

by:Adam314
Adam314 earned 50 total points
Comment Utility
Do you have the latest version of all libraries?

Maybe remove/reinstall them?
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 350 total points
Comment Utility
Have you checked your screen resolution? If you are using something like VNC to view it with, you'd get exactly the interference you've described as VNC defaults to a lower resolution in order to increase performance.

HTH:)
0
 

Author Comment

by:petece
Comment Utility
To pjedmont:
Bingo, I increased the color resolution of screen and now it looks fine!
Thank you!

To Adam314:
Well, thanks for your hint. I will make sure to always use the latest version.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now