Lines Matching refs:file
91 zend_bool php_imagick_file_init(struct php_imagick_file_t *file, const char *filename, size_t filen… in php_imagick_file_init() argument
100 file->type = ImagickUndefinedType; in php_imagick_file_init()
107 strlcpy(file->filename, filename, MaxTextExtent); in php_imagick_file_init()
108 file->filename_len = filename_len; in php_imagick_file_init()
112 GetPathComponent(file->filename, MagickPath, magick_path); in php_imagick_file_init()
118 file->type = ImagickVirtualFormat; in php_imagick_file_init()
119 file->absolute_path = estrdup(""); in php_imagick_file_init()
124 file->type = ImagickUri; in php_imagick_file_init()
125 file->absolute_path = estrdup(""); in php_imagick_file_init()
131 file->type = ImagickFile; in php_imagick_file_init()
136 GetPathComponent(file->filename, HeadPath, head_path); in php_imagick_file_init()
137 GetPathComponent(file->filename, TailPath, tail_path); in php_imagick_file_init()
142 file->absolute_path = expand_filepath(buffer, NULL TSRMLS_CC); in php_imagick_file_init()
145 if (!file->absolute_path) { in php_imagick_file_init()
146 file->absolute_path = estrdup(""); in php_imagick_file_init()
151 void php_imagick_file_deinit(struct php_imagick_file_t *file) in php_imagick_file_deinit() argument
153 if (file->absolute_path) { in php_imagick_file_deinit()
154 efree(file->absolute_path); in php_imagick_file_deinit()
155 file->absolute_path = NULL; in php_imagick_file_deinit()
160 …_using_imagemagick(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationTy… in php_imagick_read_image_using_imagemagick() argument
173 if (MagickReadImage(intern->magick_wand, file->filename) == MagickFalse) { in php_imagick_read_image_using_imagemagick()
182 if (php_sys_stat(file->absolute_path, &st) == 0 && S_ISDIR(st.st_mode)) { in php_imagick_read_image_using_imagemagick()
188 if (MagickPingImage(intern->magick_wand, file->filename) == MagickFalse) { in php_imagick_read_image_using_imagemagick()
195 MagickSetImageFilename(intern->magick_wand, file->absolute_path); in php_imagick_read_image_using_imagemagick()
201 …_using_php_streams(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationTy… in php_imagick_read_image_using_php_streams() argument
210 stream = php_stream_open_wrapper(file->filename, "rb", (IGNORE_PATH) & ~REPORT_ERRORS, NULL); in php_imagick_read_image_using_php_streams()
212 …stream = php_stream_open_wrapper(file->filename, "rb", (ENFORCE_SAFE_MODE|IGNORE_PATH) & ~REPORT_E… in php_imagick_read_image_using_php_streams()
244 MagickSetImageFilename(intern->magick_wand, file->absolute_path); in php_imagick_read_image_using_php_streams()
269 …_imagick_read_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationTy… in php_imagick_read_file() argument
273 if (file->type == ImagickFile) { in php_imagick_read_file()
274 rc = php_imagick_safe_mode_check(file->absolute_path TSRMLS_CC); in php_imagick_read_file()
281 if (file->type == ImagickUri) { in php_imagick_read_file()
282 return php_imagick_read_image_using_php_streams(intern, file, type TSRMLS_CC); in php_imagick_read_file()
284 return php_imagick_read_image_using_imagemagick(intern, file, type TSRMLS_CC); in php_imagick_read_file()
288 …imagick_write_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationTy… in php_imagick_write_file() argument
293 if (file->type == ImagickFile) { in php_imagick_write_file()
294 rc = php_imagick_safe_mode_check(file->absolute_path TSRMLS_CC); in php_imagick_write_file()
300 status = MagickWriteImage(intern->magick_wand, file->filename); in php_imagick_write_file()
302 status = MagickWriteImages(intern->magick_wand, file->filename, adjoin); in php_imagick_write_file()