Jump to content

march

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by march

  1. I've seen functions for average and dominant colours in a photo, but what I'm looking for are functions that tell me average hue of a photo. I'm don't want to worry about the lightness/darkness of and image, just the hue. Thanks.
  2. ok, I finally figured it out. The problem was that I had two separate PHP sections. <?php /* template comments */ ?> <?php /* code went here */ ?> It was the gap between two PHP sections that that caused the error. Once I turned the two PHP sections into one section then it worked. Thanks for the help guys.
  3. would having a link to the non-working image help? http://www.marchodgesphotography.com/wp/photo/?id=22&i=1
  4. if that's the case, shouldn't the last if statement catch it? it would only try to export something if the file exists, is readable and an image. Here are the variable values when I try to create the image: $gallery_path = /home/username/domain.com/photos/gallery/concerts/band-09-10-15/ $img = DSC_7108.jpg The image is there because when I remove the '/home/username/' from the path string I can call up the original photo from my webbrowser. I'm just confused to why it can find the file but can't display it.
  5. Nothing is happening, I get a blank page with the URL as the page's text. I've managed to figure out that it's working and it's inside the if statement that displays the image but it just isn't displaying. I can't seem to find an error log to see if the code is calling any errors.
  6. I'm trying to call a JPG file from within PHP (in an effort to hide the actual JPG folder). The image is supposed to be called at domain.com/photo/?id=X&i=Y where X is the gallery ID and Y is the image number, but it doesn't seem to be working. I've done this before but copying and pasting the code doesn't seem to be working. What am I missing? if (isset($_GET['id']) && isset($_GET['i'])) { //get folder location of photos $gallery_path = mhp_get_gallery_filepath($_GET['id']).'/'; //return filenames of all jpgs in folder $imgs = (mhp_img_list($gallery_path)); //get name of i-th jpg file $img = $imgs[(int) $_GET['i']]; //check to see if the image exists if (file_exists($gallery_path.$img) && is_readable($gallery_path.$img) && getimagesize($gallery_path.$img)) { header('Content-Type: image/jpeg'); $orgimage = imagecreatefromjpeg($gallery_path.$img); imagejpeg($orgimage, NULL, 90); imagedestroy($origimage); } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.