Solved

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

Posted on 2006-06-15
5
319 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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 …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Six Sigma Control Plans

627 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