Solved

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

Posted on 2006-06-15
5
315 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…

710 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