Fórum » Feedback and Ideas

Desktop background generator

 
    • dave disse...
    • Moderador
    • Jun 13 2006, 1h36
    Ok, the script was timing out. If you got the source it will time out at 10 minutes but I didn't add that as well to live one until now.

    If you can, use it from the source as the bandwidth will run out soon.

  • Still doesn't work for me, but I don't want to waste any more of your bandwidth.

    Thanks.

    • dave disse...
    • Moderador
    • Jun 13 2006, 6h19
    I added caching and made some optimisations. I can load your cover at 1280x1024 with a cover size of 130x130.

  • Re:

    Quoth dave:
    I added caching and made some optimisations. I can load your cover at 1280x1024 with a cover size of 130x130.


    If it's better optimised I'll grab the new version. :)

    Is it on the same link?

    • dave disse...
    • Moderador
    • Jun 13 2006, 7h36
    Yes, it's the same link. Without caching it's about 4x faster and with it it's about 10x faster at 1024x768. It also now uses JPEG so pumping out a 4000x3000 size image is quite smooth.

  • Re:

    Quoth dave:
    Yes, it's the same link. Without caching it's about 4x faster and with it it's about 10x faster at 1024x768. It also now uses JPEG so pumping out a 4000x3000 size image is quite smooth.


    Nice one!

    I'd already altered it to create a jpeg image but your optimisations sound impressive.

    Is there a switch to enable/disable caching?

    Anyway I'll thank you in advance as I'll grab the new code this evening when I get home from work. :)

    • Fuso disse...
    • Usuário
    • Jun 13 2006, 14h48
    so cool, thank you! :)

  • Re:

    Quoth dave:
    I added caching and made some optimisations. I can load your cover at 1280x1024 with a cover size of 130x130.

    It not only works now, but it's FAST! I did 1280x768 with a cover size of 128x128 (perfect fit), and it was almost instant.

    Thanks! :)

  • Oh wow! I've just tested using the code on Dave's server and boy it is fast!

    That's a hell of an improvement. Thank you :)

    Don't worry, I'll upload to my server tonight so I'm not poncing any more of your bandwidth. ;)

    • halnine disse...
    • Usuário
    • Jun 15 2006, 3h53
    Brilliant, dave. But it seems as if the album order / content is randomized, since every run of the scripts creates a different image.

    • dave disse...
    • Moderador
    • Jun 15 2006, 5h02
    That's the idea, you can comment out the randomisation code if you like.

    Thanks for the feedback, I'm out of bandwidth at the moment but I'll have it up somewhere soon.

  • My BG isn't randomised and I didn't edit anything.

    Is the randomisation already commented out on the code you supplied?

    • dave disse...
    • Moderador
    • Jun 15 2006, 10h39
    No. Only version 0.1 doesn't randomise the position of the cover art.

  • Hmmm. Strange

    I have the second version of code you supplied.

    Well of course I'll check when I get home.

    Perhaps I accidentally knocked something when I was messing with it. :)

    • zephirnl disse...
    • Usuário
    • Jun 15 2006, 18h59
    hmm i tried to run it on my osX apache with php but all I got was garvled text. I'm guessing my browser didn't recognise it as an image? anyone else have this? It's the same in Safari as in FireFox...

  • Re:

    Quoth zephirnl:
    hmm i tried to run it on my osX apache with php but all I got was garvled text. I'm guessing my browser didn't recognise it as an image? anyone else have this? It's the same in Safari as in FireFox...


    Sounds like a GD lib problem to me. What version of PHP is your server running?

    • dave disse...
    • Moderador
    • Jun 16 2006, 4h17
    Mac OS X v10.4 comes with PHP 4.4.1, and doesn't include the GD libraries. If you try to run it you'll get a fatal error at line 126.

    If you saw garbled text, there was probably a warning (possibly at line 75) and the resulting image couldn't be displayed as the file was already sent as text/html content.

    • zephirnl disse...
    • Usuário
    • Jun 20 2006, 6h30
    I only get garbled text, nothing i can see as a warning message, in the source (from the browser) this is the first line of code:
    ÿØÿàJFIFÿþ<CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 100

    iI have PHP Version 4.3.11
    GD Support enabled
    GD Version bundled (2.0.28 compatible)
    FreeType Support enabled
    FreeType Linkage with freetype
    T1Lib Support enabled
    GIF Read Support enabled
    GIF Create Support enabled
    JPG Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled

    Any ideas?

    • dave disse...
    • Moderador
    • Jun 20 2006, 12h22
    Have you modified the code in any way at all?

    If there are no warning or error messages, then the Content-Type: image/jpeg header is not being sent for some reason, as even if it wasn't a valid JPEG header as it is above, no garbled text would appear. You could get the Safari WebDevAdditions and see exactly what HTTP headers are being sent.

    I've got new hosting, so feel free to use the hosted script at this temporary link.

  • I stil can't figure out why my background doesn't randomise! :s

    I'm using version 0.2 Released 2006-06-13

    Still looks cool though! :D

    Here's mine: http://simhum.freecoolsite.com/albums.jpg

    It's too small for a desktop wallpaper by design as I use it as a background to this page

    • dave disse...
    • Moderador
    • Jun 20 2006, 12h47
    I can't figure out why your image wouldn't randomise... Are you sure your browser is just not caching the same image? Using the link above, your image randomises. Does it for you using that link?

  • Re:

    Quoth dave:
    I can't figure out why your image wouldn't randomise... Are you sure your browser is just not caching the same image? Using the link above, your image randomises. Does it for you using that link?


    :s

    It randomises for you?!?

    I'm using FireFox and ctrl+F5 to force a refresh and it's the same image every time.

    Wierd!

    It's not a big deal as I epxect the image will change each time my overall charts get updated but it does seem strange. :/

    • dave disse...
    • Moderador
    • Jun 20 2006, 13h22
    I've added some headers to ensure the image isn't cached, although I'm not even sure that's the problem, caching CGI generated images wouldn't appear to be a good idea anyway.

  • Re:

    Quoth dave:
    I've added some headers to ensure the image isn't cached, although I'm not even sure that's the problem, caching CGI generated images wouldn't appear to be a good idea anyway.


    The last link you provided does randomise for me.

    Where I've editted your code to default to my username and preferred x / y dimensions I expect I've crippled the randomisation code.

    I'm a total novice when it comes to PHP so I can't really see which part randomises the output though.

    Not a biggie though :)

    • Neo2k disse...
    • Usuário
    • Jun 20 2006, 15h08

    Re:Re:

    great idea ;)

Usuários anônimos não podem postar mensagens. É preciso fazer login ou criar uma conta para postar nos fóruns.