Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-06-15
5
Medium Priority
?
324 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 400 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 200 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 1400 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
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…
Six Sigma Control Plans

705 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