| The Red Matrix

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Pages
Classes | Functions
photo_driver.php File Reference

## Classes
class | photo_driver

## Functions
| photo_factory ($data, $type=null)
| guess_image_type ($filename, $headers= '')
| import_profile_photo ($photo, $xchan, $thing=false)
| import_channel_photo ($photo, $type, $aid, $uid)

## Function Documentation

guess_image_type | ( |  | $filename,
|  |  | $headers = `''`
| ) |  |

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 import_profile_photo(), photo_upload(), profile_photo_post(), and scale_external_images().

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

Referenced by import_post(), and import_xchan().

import_profile_photo | ( |  | $photo,
|  |  | $xchan,
|  |  | $thing = `false`
| ) |  |

Referenced by import_author_rss(), import_post(), import_xchan(), openid_content(), poller_run(), and thing_init().

photo_factory | ( |  | $data,
|  |  | $type = `null`
| ) |  |

Referenced by fbrowser_content(), fix_private_photos(), guess_image_type(), import_channel_photo(), import_profile_photo(), photo_init(), photo_upload(), photos_content(), photos_post(), profile_photo_post(), and scale_external_images().