1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP Image Help

Discussion in 'PHP' started by Pudge1, Sep 3, 2009.

  1. #1
    http://picblur.com/index.php?page=texttoimage

    When you create an image there it makes the image just fine but when you right click save as and then choose All Files then add .png to the end of it, it saves a corrupt PNG file.
     
    Pudge1, Sep 3, 2009 IP
  2. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #2
    Well, you will have to post the source code for us to analyze ... Moreover , Firefox doesn't seem to display the PNG in the 1st place... how did you manage to save it ?
     
    killerj, Sep 3, 2009 IP
  3. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #3
    FireFox displayed it just fine... I right clicked on it and clicked Save As...
     
    Pudge1, Sep 3, 2009 IP
  4. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Simple.. Don't affix '.png' to the end of the image, as it is most likely not a PNG image.
     
    Marc Fraser, Sep 3, 2009 IP
  5. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #5
    I set the header to image/png and used imagepng(). I have no idea why it would be anything else.
     
    Pudge1, Sep 3, 2009 IP
  6. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #6
    No longer need help.
     
    Pudge1, Sep 3, 2009 IP
  7. Hanratty

    Hanratty Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    <?php
    include("includes.php");
    header("Content-Type: image/png");
    $im = imagecreatefrompng("http://i13.photobucket.com/albums/a287/Rickmasta185/149d6e5d2da9f136898079693.png");



    if ($im)
    {
    ImageString($im, 1, 17, 4, $final, 2);


    ImagePNG($im);
    }
    ?>
     
    Hanratty, Sep 4, 2009 IP
  8. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #8
    that wouldn't have worked but I already said that I got it to work.
     
    Pudge1, Sep 4, 2009 IP