FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
arrayfire/src/api/cpp/imageio.cpp at master · arrayfire/arrayfire · GitHub
arrayfire
arrayfire
Repository navigation
Code
Issues
292
(292)
Pull requests
39
(39)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
arrayfire
/
src
/
api
/
cpp
/
imageio.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
65 lines (52 loc) · 1.65 KB
Breadcrumbs
arrayfire
/
src
/
api
/
cpp
/
imageio.cpp
Copy path
File metadata and controls
65 lines (52 loc) · 1.65 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
*******************************************************
*/
#
include
<
af/array.h
>
#
include
<
af/compatible.h
>
#
include
<
af/image.h
>
#
include
"
error.hpp
"
namespace
af
{
array
loadImage
(
const
char
* filename,
const
bool
is_color) {
af_array out =
0
;
AF_THROW
(
af_load_image
(&out, filename, is_color));
return
array
(out);
}
array
loadImageMem
(
const
void
* ptr) {
af_array out =
0
;
AF_THROW
(
af_load_image_memory
(&out, ptr));
return
array
(out);
}
array
loadimage
(
const
char
* filename,
const
bool
is_color) {
return
loadImage
(filename, is_color);
}
void
saveImage
(
const
char
* filename,
const
array& in) {
AF_THROW
(
af_save_image
(filename, in.
get
()));
}
void
*
saveImageMem
(
const
array& in,
const
imageFormat format) {
void
* ptr =
NULL
;
AF_THROW
(
af_save_image_memory
(&ptr, in.
get
(), format));
return
ptr;
}
void
saveimage
(
const
char
* filename,
const
array& in) {
return
saveImage
(filename, in);
}
void
deleteImageMem
(
void
* ptr) {
AF_THROW
(
af_delete_image_memory
(ptr)); }
array
loadImageNative
(
const
char
* filename) {
af_array out =
0
;
AF_THROW
(
af_load_image_native
(&out, filename));
return
array
(out);
}
void
saveImageNative
(
const
char
* filename,
const
array& in) {
AF_THROW
(
af_save_image_native
(filename, in.
get
()));
}
bool
isImageIOAvailable
() {
bool
out =
false
;
AF_THROW
(
af_is_image_io_available
(&out));
return
out;
}
}
//
namespace af
Back
|
FazBrowse Home
|
New Git URL