Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: UNSOLVED: Dynamically changing colors and resizing image

  1. #11
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    Without looking at it too closely it should work. I thought you were talking about altering a photograph or something like that.

  2. #12
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    BUMP
    --------
    I do, indeed, have ImageMagick, if that's of any use.
    --------
    I still need help. I know next-to-no PHP.
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  3. #13
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    Sorry, thought that your problem was solved. I'm afraid I have told you about all I know about the GD aspect of php. I am hoping someone else who is more familiar with it can help out from here. Can you post a link to the image you are talking about so I can see what you are working with?

    Out of curiosity what is the area of web design that you are most skilled at if it is not php?

  4. #14
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Can you post a link to the image you are talking about so I can see what you are working with?
    Eh... http://www.seangillen.com/Untitled-1.gif

    Out of curiosity what is the area of web design that you are most skilled at if it is not php?
    Like, languages?
    I guess HTML; it's the only thing I've ever successfully written without using references or copy-and-pasting code...
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  5. #15
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    bump.
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  6. #16
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    lazy reply on my part, but try playing around with some of the scripts from my website. In it there is a page titled PHP -- Image Processing where I discuss what I have learned so far with GD. I am still expanding it and scanning for errors, but I think a lot of what you are looking for is listed there and there are a lot of sample scripts that you can try and adapt for your own purposes.

    If you do find something useful there please post it here so others can see the solution as well. I am still learning, but I am about ready to start learning about some other aspects of PHP such as php.ini files or more on PCRE syntax.

    EDIT: I had to sleep. Long day/night at work. Anyway, look at the following:
    Code:
    <?php
    header('Content-type: image/jpeg');
    $filename = 'http://www.animeviews.com/images/screenshots/cowboybebop27.JPG';
    $im = imagecreatefromjpeg($filename); 
    imagetruecolortopalette($im, false, 255);
    $ig = imagecolorat($im, 20, 20);
    imagecolorset($im, $ig, 0, 0, 255);
    imagejpeg($im, null, 100);
    ?>
    In your case the code would look something like the following since you are working with a gif image.
    Code:
    <?php
    header('Content-type: image/gif');
    $filename = 'http://www.seangillen.com/Untitled-1.gif';
    $im = imagecreatefromgif($filename); 
    imagetruecolortopalette($im, false, 255);
    $ig = imagecolorat($im, 0, 0);
    imagecolorset($im, $ig, 0, 99, 0);
    imagegif($im, null, 100);
    ?>
    Look at the other sample scripts too and let me know where you get stuck. I'll help if I can.
    Last edited by james438; 09-15-2008 at 03:22 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •