Welcome,
Guest
. Please
login
or
register
.
November 24, 2024, 04:33:56 AM
News:
tastyspleen.net discord server:
http://discord.tastyspleen.net
Home
Forum
Help
TinyPortal
Search
Calendar
Login
Register
tastyspleen::quake 2 community
»
Forum
»
The Tech Junkie Boards
»
0x1337c0de
»
ASP, PYTHON? Hope nobody is afraid of snakes
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: ASP, PYTHON? Hope nobody is afraid of snakes (Read 2229 times)
peewee_RotA
Brobdingnagian Member
Posts: 4152
Hi, I'm from the gov'ment and I'm here to help you
Rated:
ASP, PYTHON? Hope nobody is afraid of snakes
«
on:
May 13, 2009, 02:32:16 PM »
We needed to resize a picture inside of the 2d engine we're using. So myself and another programmer were discussing it:
me: "I don't want to invest the time looking into resizing a picture in C"
Other Programmer: "Yeah it will probably take a week just to add that functionality"
me: "So can we just have the webpage that displays this picture resize it?"
Other Programmer: "No, it won't filter or resample it and it will look like crap"
me: "yeah and it'd be such a wast in processing power and dev time to have the server resize it when it gets sent to the server"
Other Programmer: "yep"
...1 minute passes...
me: "Wait what if I just resize it in python"
Other Programmer: "Yeah, that'll probably take 15 minutes to figure out"
This conversation happened 15 minutes ago
Logged
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
Tune in to the
Tastycast!!!!
http://dna.zeliepa.net
quadz
Loquaciously Multiloquent Member
Posts: 5352
Rated:
Re: ASP, PYTHON? Hope nobody is afraid of snakes
«
Reply #1 on:
May 13, 2009, 04:07:20 PM »
Quote from: peewee_RotA on May 13, 2009, 02:32:16 PM
We needed to resize a picture inside of the 2d engine we're using.
If this is a server-side app, another simple solution could be to install the imagemagick library.
(Simple as
apt-get install imagemagick
on debian or ubuntu.)
Then just shell out to its convert program, like:
`convert rose.jpg -resize 50% rose.png`
It supports somewhere around 9 billion options if you want to get fancy:
http://www.imagemagick.org/script/convert.php
But you don't need to learn the fancier options to script simple conversions as in the example above.
Logged
"He knew all the tricks, dramatic irony, metaphor, bathos, puns, parody, litotes and... satire. He was vicious."
peewee_RotA
Brobdingnagian Member
Posts: 4152
Hi, I'm from the gov'ment and I'm here to help you
Rated:
Re: ASP, PYTHON? Hope nobody is afraid of snakes
«
Reply #2 on:
May 13, 2009, 05:19:04 PM »
2 issues
Doing the resizing on the client is an option and therefore better left off of the server.
The server is unfortunately windows server 2003
But yeah, we solved what we thought was going to be a 3 day headache in 15 minutes with python. Python = awesome.
Logged
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
Tune in to the
Tastycast!!!!
http://dna.zeliepa.net
[BTF]Sigma
Phenomenally Prodigious Member
Posts: 3059
Rated:
Re: ASP, PYTHON? Hope nobody is afraid of snakes
«
Reply #3 on:
May 13, 2009, 05:23:58 PM »
Python has allowed my cell phone to be used as a level and a 6-axis controller for my PC.
I have no idea how it does it but it's awesome.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
tastyspleen::quake 2 community
»
Forum
»
The Tech Junkie Boards
»
0x1337c0de
»
ASP, PYTHON? Hope nobody is afraid of snakes
El Box de Shoutamente
Last 10 Shouts:
Costigan_Q2
November 11, 2024, 06:41:06 AM
"Stay cozy folks.
Everything is gonna be fine."
There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
|iR|Focalor
November 06, 2024, 03:28:50 AM
RailWolf
November 05, 2024, 03:13:44 PM
Nice
Tom Servo
November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.
Costigan_Q2
November 04, 2024, 03:37:55 PM
Stay cozy folks.
Everything is gonna be fine.
|iR|Focalor
October 31, 2024, 08:56:37 PM
Costigan_Q2
October 17, 2024, 06:31:53 PM
Not activated your account yet?
Activate it now! join in the fun!
Tom Servo
October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
|iR|Focalor
October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
rikwad
October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.
Show 50 latest
User
Welcome,
Guest
. Please
login
or
register
.
November 24, 2024, 04:33:56 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search
Advanced search