Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
magick_Magick.c
Package: verifidecoder_src.rar [view]
Upload User: qingzhou
Upload Date: 2013-04-21
Package Size: 733k
Code Size: 1k
Category:
Crack_Hack
Development Platform:
Java
- #include <jni.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <time.h>
- #include <sys/types.h>
- #include <magick/api.h>
- #include "jmagick.h"
- #include "magick_Magick.h"
- /*
- * Class: magick_Magick
- * Method: parseImageGeometry
- * Signature: (Ljava/lang/String;Ljava/awt/Rectangle;)I
- */
- JNIEXPORT jint JNICALL Java_magick_Magick_parseImageGeometry
- (JNIEnv *env, jclass magickClass, jstring geometry, jobject rect)
- {
- unsigned long x, y, width, height;
- jint flags;
- const char *cstr;
- if (!getIntFieldValue(env, rect, "width", NULL, (jint *) &width) ||
- !getIntFieldValue(env, rect, "height", NULL, (jint *) &height) ||
- !getIntFieldValue(env, rect, "x", NULL, (jint *) &x) ||
- !getIntFieldValue(env, rect, "y", NULL, (jint *) &y)) {
- throwMagickException(env, "Unable to obtain Rectangle values");
- return 0;
- }
- cstr = (const char *) (*env)->GetStringUTFChars(env, geometry, 0);
- flags = ParseImageGeometry(cstr, &x, &y, &width, &height);
- (*env)->ReleaseStringUTFChars(env, geometry, cstr);
- if (!setIntFieldValue(env, rect, "width", NULL, width) ||
- !setIntFieldValue(env, rect, "height", NULL, height) ||
- !setIntFieldValue(env, rect, "x", NULL, x) ||
- !setIntFieldValue(env, rect, "y", NULL, y)) {
- throwMagickException(env, "Unable to set Rectangle values");
- return 0;
- }
- return flags;
- }