Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Images from - Android

by clanrbr (Novice)
on Dec 18, 2012 at 12:46 UTC ( #1009357=note: print w/ replies, xml ) Need Help??


in reply to Re: Images from - Android
in thread Images from - Android

This app is posting the image to perl script.

my $req = new CGI; $contentpic=$req->param("pic") if ($req->param("pic") ); if ( open ( PICTF,">somepath/image.jpeg" ) ) { binmode PICTF; print PICTF $contentpic; close (PICTF); my ($x, $y, $info) = imgsize("somepath/image.jpeg"); $info=lc($info); $info=~s/jpg/jpeg/; if ( $info eq "jpeg" ) { my $logo=Imager->new(); $logo->read(file =>"somepath/mylogo.png", type => 'png'); my $imgorg=Imager->new(); $imgorg->read(file => "somepath/image.jpeg", type => $info); my $img=$imgorg->scale(xpixels=>280); my ($tx,$ty)=((280-$logosize[0]-$logooffs),(int(280*$y/$x)-$log +osize[1]-$logooffs)); $img->rubthrough( src=>$logo, tx=>$tx,ty=>$ty ); $img->write(file => "somepath/image.jpeg", type => $info); $result=1; }


Comment on Re^2: Images from - Android
Download Code
Re^3: Images from - Android
by BrowserUk (Pope) on Dec 18, 2012 at 13:20 UTC
    This app is posting the image to perl script.

    You're missing the point. Where and how do you obtain the data held in $contentpic?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009357]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2014-08-20 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (121 votes), past polls