Solved

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

Posted on 2006-06-15
5
295 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
ID: 16918550
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
ID: 16918916
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
ID: 16921549
Do you have the latest version of all libraries?

Maybe remove/reinstall them?
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 350 total points
ID: 16939149
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
ID: 16940027
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 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