The Red Project
 All Classes Namespaces Files Functions Variables Pages
Photo.php File Reference

Classes

class  Photo
 

Functions

 guess_image_type ($filename, $fromcurl=false)
 
 import_profile_photo ($photo, $xchan)
 
 import_channel_photo ($photo, $type, $aid, $uid)
 

Function Documentation

guess_image_type (   $filename,
  $fromcurl = false 
)

Guess image mimetype from filename or from Content-Type header

  • $filename string Image filename
  • $fromcurl boolean Check Content-Type header from curl request

Well, this not much better, but at least it comes from the data inside the image, we won't be tricked by a manipulated extension

Referenced by consume_feed(), import_profile_photo(), local_delivery(), photo_upload(), profile_photo_post(), and scale_external_images().

import_channel_photo (   $photo,
  $type,
  $aid,
  $uid 
)

Referenced by import_post().

import_profile_photo (   $photo,
  $xchan 
)