d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Random Avator And Signatures Rotator
123Next
Add Reply New Topic New Poll
Member
Posts: 30,168
Joined: Jun 10 2010
Gold: 1,157.00
Jul 30 2016 01:30pm
So I have one right now but its hosted by a person that's AFK alot x
X

Would like to run it myself and he won't give up the code...

The avatar and signature must always match. Must be able to do
PNG,jpg and gifs

Lmk how much this will cost.

Yes there is lots of free services out there but they don't do matching rotators
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jul 30 2016 01:37pm
1500fg.
Member
Posts: 30,168
Joined: Jun 10 2010
Gold: 1,157.00
Jul 30 2016 01:38pm
Quote (AbDuCt @ Jul 30 2016 03:37pm)
1500fg.


this work with centos?
Member
Posts: 6,117
Joined: Jul 11 2007
Gold: 96.18
Jul 30 2016 03:13pm
In python you can do this:


Quote ( Posted 16th July 2008 by Brad Montgomery on some other site)
Django: Generating an Image with PIL
I've been reading through the Django Book, and in chapter 11 they talk about generating non-HTML content
(such as PDF files, Images, RSS/Atom Feeds). They mention using PIL to generate images, but they don't give an example.
So, I thought I'd post a simple example View that generates an image.


Code
def pil_image(request):
''' A View that Returns a PNG Image generated using PIL'''

import Image, ImageDraw

size = (100,50) # size of the image to create
im = Image.new('RGB', size) # create the image
draw = ImageDraw.Draw(im) # create a drawing object that is
# used to draw on the new image
red = (255,0,0) # color of our text
text_pos = (10,10) # top-left position of our text
text = "Hello World!" # text to draw
# Now, we'll do the drawing:
draw.text(text_pos, text, fill=red)

del draw # I'm done drawing so I don't need this anymore

# We need an HttpResponse object with the correct mimetype
response = HttpResponse(mimetype="image/png")
# now, we tell the image to save as a PNG to the
# provided file-like object
im.save(response, 'PNG')

return response # and we're done!



btw if you get some working code please share it with us so we all can use it also please!

This post was edited by implite on Jul 30 2016 03:24pm
Member
Posts: 6,117
Joined: Jul 11 2007
Gold: 96.18
Jul 30 2016 03:32pm
Here is the old php guide if you dont want to mess with the stuff above to get it working the way you want.
http://forums.d2jsp.org/topic.php?t=59759454&f=34
Member
Posts: 30,168
Joined: Jun 10 2010
Gold: 1,157.00
Jul 30 2016 03:41pm
Quote (implite @ Jul 30 2016 05:13pm)
In python you can do this:




Code
def pil_image(request):
''' A View that Returns a PNG Image generated using PIL'''

import Image, ImageDraw

size = (100,50) # size of the image to create
im = Image.new('RGB', size) # create the image
draw = ImageDraw.Draw(im) # create a drawing object that is
# used to draw on the new image
red = (255,0,0) # color of our text
text_pos = (10,10) # top-left position of our text
text = "Hello World!" # text to draw
# Now, we'll do the drawing:
draw.text(text_pos, text, fill=red)

del draw # I'm done drawing so I don't need this anymore

# We need an HttpResponse object with the correct mimetype
response = HttpResponse(mimetype="image/png")
# now, we tell the image to save as a PNG to the
# provided file-like object
im.save(response, 'PNG')

return response # and we're done!



btw if you get some working code please share it with us so we all can use it also please!


Quote (implite @ Jul 30 2016 05:32pm)
Here is the old php guide if you dont want to mess with the stuff above to get it working the way you want.
http://forums.d2jsp.org/topic.php?t=59759454&f=34


im looking for an image rotator not a image maker
Member
Posts: 6,117
Joined: Jul 11 2007
Gold: 96.18
Jul 30 2016 04:18pm
Quote (CyberGod @ Jul 30 2016 05:41pm)
im looking for an image rotator not a image maker


I think this one is the one you want http://forums.d2jsp.org/topic.php?t=26027438
Have 2 addresses running, one for sigs and one for avatars however I dont know how to link it to make it know that its displaying this sig image so only display this avatar...
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jul 30 2016 05:55pm
Quote (CyberGod @ Jul 30 2016 03:38pm)
this work with centos?


It would work on anything that can run an httpd and php. I prefer nginx and php.
Member
Posts: 30,168
Joined: Jun 10 2010
Gold: 1,157.00
Jul 30 2016 06:23pm
Quote (AbDuCt @ Jul 30 2016 07:55pm)
It would work on anything that can run an httpd and php. I prefer nginx and php.


friend did it for me in python :D
Member
Posts: 6,117
Joined: Jul 11 2007
Gold: 96.18
Jul 30 2016 06:27pm
Quote (CyberGod @ Jul 30 2016 08:23pm)
friend did it for me in python :D


I wonder if he will share his code?
Go Back To Programming & Development Topic List
123Next
Add Reply New Topic New Poll