Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
ab0c3fdc
Commit
ab0c3fdc
authored
26 years ago
by
Mirar (Pontus Hagland)
Browse files
Options
Downloads
Patches
Plain Diff
added: decode_header
Rev: src/modules/_Image_XFace/image_xface.c:1.5
parent
5645b63a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/_Image_XFace/image_xface.c
+45
-1
45 additions, 1 deletion
src/modules/_Image_XFace/image_xface.c
with
45 additions
and
1 deletion
src/modules/_Image_XFace/image_xface.c
+
45
−
1
View file @
ab0c3fdc
#include
"global.h"
#include
"global.h"
RCSID
(
"$Id: image_xface.c,v 1.
4
1998/0
4/09 00:44:08 marcus
Exp $"
);
RCSID
(
"$Id: image_xface.c,v 1.
5
1998/0
6/19 15:12:45 mirar
Exp $"
);
#include
"config.h"
#include
"config.h"
...
@@ -432,6 +432,48 @@ static void image_xface_encode(INT32 args)
...
@@ -432,6 +432,48 @@ static void image_xface_encode(INT32 args)
}
}
}
}
/*
**! method object decode_header(string data)
**! method object decode_header(string data, mapping options)
**! Decodes an X-Face image header.
**!
**! <pre>
**! "xsize":int
**! "ysize":int
**! size of image
**! "type":"image/x-xface"
**! file type information
**! </pre>
**!
**! The <tt>options</tt> argument may be a mapping
**! containing zero options.
**!
**! note
**! There aint no such thing as a X-Face image header.
**! This stuff tells the characteristics of an X-Face image.
**!
*/
static
void
image_xface_decode_header
(
INT32
args
)
{
if
(
args
<
1
||
sp
[
-
args
].
type
!=
T_STRING
)
error
(
"Image.XFace.decode: Illegal arguments
\n
"
);
pop_n_elems
(
args
);
push_text
(
"type"
);
push_text
(
"image/x-xface"
);
push_text
(
"xsize"
);
push_int
(
48
);
push_text
(
"ysize"
);
push_int
(
48
);
f_aggregate_mapping
(
6
);
}
#endif
/* HAVE_GMP_H */
#endif
/* HAVE_GMP_H */
/*** module init & exit & stuff *****************************************/
/*** module init & exit & stuff *****************************************/
...
@@ -460,6 +502,8 @@ void pike_module_init(void)
...
@@ -460,6 +502,8 @@ void pike_module_init(void)
{
{
add_function
(
"decode"
,
image_xface_decode
,
add_function
(
"decode"
,
image_xface_decode
,
"function(string,void|mapping(string:int):object)"
,
0
);
"function(string,void|mapping(string:int):object)"
,
0
);
add_function
(
"decode_header"
,
image_xface_decode_header
,
"function(string,void|mapping(string:int):object)"
,
0
);
add_function
(
"encode"
,
image_xface_encode
,
add_function
(
"encode"
,
image_xface_encode
,
"function(object,void|mapping(string:int):string)"
,
0
);
"function(object,void|mapping(string:int):string)"
,
0
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment