From 30603ff303da0300c5ee2203a0aab56b679b052c Mon Sep 17 00:00:00 2001 From: cristy Date: Fri, 7 Oct 2011 00:43:07 +0000 Subject: [PATCH] --- MagickCore/MagickCore.h | 1 + MagickCore/Makefile.am | 16 +- MagickCore/nt-base.c | 691 +++++++++++++++++++++++++++++++++++++--- MagickCore/nt-base.h | 411 +----------------------- MagickCore/nt-feature.c | 674 --------------------------------------- MagickCore/nt-feature.h | 43 --- MagickCore/version.h | 4 +- Makefile.in | 93 ++---- config/configure.xml | 4 +- configure | 2 +- 10 files changed, 705 insertions(+), 1234 deletions(-) delete mode 100644 MagickCore/nt-feature.c delete mode 100644 MagickCore/nt-feature.h diff --git a/MagickCore/MagickCore.h b/MagickCore/MagickCore.h index bfa269c18..88e2ac140 100644 --- a/MagickCore/MagickCore.h +++ b/MagickCore/MagickCore.h @@ -191,6 +191,7 @@ extern "C" { #include "MagickCore/monitor.h" #include "MagickCore/montage.h" #include "MagickCore/morphology.h" +#include "MagickCore/nt-base.h" #include "MagickCore/option.h" #include "MagickCore/paint.h" #include "MagickCore/pixel.h" diff --git a/MagickCore/Makefile.am b/MagickCore/Makefile.am index ee3094eff..9f2188eaa 100644 --- a/MagickCore/Makefile.am +++ b/MagickCore/Makefile.am @@ -271,16 +271,7 @@ if WIN32_NATIVE_BUILD MAGICKCORE_PLATFORM_SRCS = \ MagickCore/nt-base.c \ MagickCore/nt-base.h \ - MagickCore/nt-feature.c \ - MagickCore/nt-feature.h -else -if CYGWIN_BUILD -MAGICKCORE_PLATFORM_SRCS = \ - MagickCore/nt-feature.c \ - MagickCore/nt-feature.h -else -MAGICKCORE_PLATFORM_SRCS = -endif # if CYGWIN_BUILD + MagickCore/nt-base-private.h endif # if WIN32_NATIVE_BUILD MAGICKCORE_INCLUDE_HDRS = \ @@ -341,6 +332,7 @@ MAGICKCORE_INCLUDE_HDRS = \ MagickCore/monitor.h \ MagickCore/montage.h \ MagickCore/morphology.h \ + MagickCore/nt-base.h \ MagickCore/option.h \ MagickCore/paint.h \ MagickCore/pixel.h \ @@ -409,8 +401,7 @@ MAGICKCORE_NOINST_HDRS = \ MagickCore/module-private.h \ MagickCore/monitor-private.h \ MagickCore/morphology-private.h \ - MagickCore/nt-base.h \ - MagickCore/nt-feature.h \ + MagickCore/nt-base-private.h \ MagickCore/policy-private.h \ MagickCore/profile-private.h \ MagickCore/quantum-private.h \ @@ -447,7 +438,6 @@ MAGICKCORE_EXTRA_DIST = \ MagickCore/config.h_vms \ MagickCore/mac.c \ MagickCore/nt-base.c \ - MagickCore/nt-feature.c \ MagickCore/vms.c \ MagickCore/xwdfile.h_vms diff --git a/MagickCore/nt-base.c b/MagickCore/nt-base.c index bdc02e904..a1a5e4ddf 100644 --- a/MagickCore/nt-base.c +++ b/MagickCore/nt-base.c @@ -56,6 +56,7 @@ # include "ltdl.h" #endif #include "MagickCore/nt-base.h" +#include "MagickCore/nt-base-private.h" #if defined(MAGICKCORE_CIPHER_SUPPORT) #include #include @@ -95,6 +96,171 @@ extern "C" BOOL WINAPI % % % % % % +% C r o p I m a g e T o H B i t m a p % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% CropImageToHBITMAP() extracts a specified region of the image and returns +% it as a Windows HBITMAP. While the same functionality can be accomplished by +% invoking CropImage() followed by ImageToHBITMAP(), this method is more +% efficient since it copies pixels directly to the HBITMAP. +% +% The format of the CropImageToHBITMAP method is: +% +% HBITMAP CropImageToHBITMAP(Image* image,const RectangleInfo *geometry, +% ExceptionInfo *exception) +% +% A description of each parameter follows: +% +% o image: the image. +% +% o geometry: Define the region of the image to crop with members +% x, y, width, and height. +% +% o exception: return any errors or warnings in this structure. +% +*/ +MagickExport void *CropImageToHBITMAP(Image *image, + const RectangleInfo *geometry,ExceptionInfo *exception) +{ +#define CropImageTag "Crop/Image" + + BITMAP + bitmap; + + HBITMAP + bitmapH; + + HANDLE + bitmap_bitsH; + + MagickBooleanType + proceed; + + RectangleInfo + page; + + register const Quantum + *p; + + register RGBQUAD + *q; + + RGBQUAD + *bitmap_bits; + + ssize_t + y; + + /* + Check crop geometry. + */ + assert(image != (const Image *) NULL); + assert(image->signature == MagickSignature); + if (image->debug != MagickFalse) + (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); + assert(geometry != (const RectangleInfo *) NULL); + assert(exception != (ExceptionInfo *) NULL); + assert(exception->signature == MagickSignature); + if (((geometry->x+(ssize_t) geometry->width) < 0) || + ((geometry->y+(ssize_t) geometry->height) < 0) || + (geometry->x >= (ssize_t) image->columns) || + (geometry->y >= (ssize_t) image->rows)) + ThrowImageException(OptionError,"GeometryDoesNotContainImage"); + page=(*geometry); + if ((page.x+(ssize_t) page.width) > (ssize_t) image->columns) + page.width=image->columns-page.x; + if ((page.y+(ssize_t) page.height) > (ssize_t) image->rows) + page.height=image->rows-page.y; + if (page.x < 0) + { + page.width+=page.x; + page.x=0; + } + if (page.y < 0) + { + page.height+=page.y; + page.y=0; + } + + if ((page.width == 0) || (page.height == 0)) + ThrowImageException(OptionError,"GeometryDimensionsAreZero"); + /* + Initialize crop image attributes. + */ + bitmap.bmType = 0; + bitmap.bmWidth = (LONG) page.width; + bitmap.bmHeight = (LONG) page.height; + bitmap.bmWidthBytes = bitmap.bmWidth * 4; + bitmap.bmPlanes = 1; + bitmap.bmBitsPixel = 32; + bitmap.bmBits = NULL; + + bitmap_bitsH=(HANDLE) GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE,page.width* + page.height*bitmap.bmBitsPixel); + if (bitmap_bitsH == NULL) + return(NULL); + bitmap_bits=(RGBQUAD *) GlobalLock((HGLOBAL) bitmap_bitsH); + if ( bitmap.bmBits == NULL ) + bitmap.bmBits = bitmap_bits; + if (IsRGBColorspace(image->colorspace) == MagickFalse) + TransformImageColorspace(image,RGBColorspace); + /* + Extract crop image. + */ + q=bitmap_bits; + for (y=0; y < (ssize_t) page.height; y++) + { + p=GetVirtualPixels(image,page.x,page.y+y,page.width,1,exception); + if (p == (const Quantum *) NULL) + break; + +#if MAGICKCORE_QUANTUM_DEPTH == 8 + /* Form of PixelPacket is identical to RGBQUAD when MAGICKCORE_QUANTUM_DEPTH==8 */ + CopyMagickMemory((void*)q,(const void*)p,page.width*sizeof(PixelPacket)); + q += page.width; + +#else /* 16 or 32 bit Quantum */ + { + ssize_t + x; + + /* Transfer pixels, scaling to Quantum */ + for( x=(ssize_t) page.width ; x> 0 ; x-- ) + { + q->rgbRed = ScaleQuantumToChar(GetPixelRed(image,p)); + q->rgbGreen = ScaleQuantumToChar(GetPixelGreen(image,p)); + q->rgbBlue = ScaleQuantumToChar(GetPixelBlue(image,p)); + q->rgbReserved = 0; + ++q; + ++p; + } + } +#endif + proceed=SetImageProgress(image,CropImageTag,y,page.height); + if (proceed == MagickFalse) + break; + } + if (y < (ssize_t) page.height) + { + GlobalUnlock((HGLOBAL) bitmap_bitsH); + GlobalFree((HGLOBAL) bitmap_bitsH); + return((void *) NULL); + } + bitmap.bmBits=bitmap_bits; + bitmapH=CreateBitmapIndirect(&bitmap); + GlobalUnlock((HGLOBAL) bitmap_bitsH); + GlobalFree((HGLOBAL) bitmap_bitsH); + return((void *) bitmapH); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % D l l M a i n % % % % % @@ -231,7 +397,7 @@ BOOL WINAPI DllMain(HINSTANCE handle,DWORD reason,LPVOID lpvReserved) % process. % */ -MagickExport int Exit(int status) +MagickPrivate int Exit(int status) { if (IsWindows95()) TerminateProcess(GetCurrentProcess(),(unsigned int) status); @@ -264,7 +430,7 @@ MagickExport int Exit(int status) % o time_zone: the time zone. % */ -MagickExport int gettimeofday (struct timeval *time_value, +MagickPrivate int gettimeofday (struct timeval *time_value, struct timezone *time_zone) { #define EpochFiletime MagickLLConstant(116444736000000000) @@ -311,6 +477,121 @@ MagickExport int gettimeofday (struct timeval *time_value, % % % % % % +% I m a g e T o H B i t m a p % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% ImageToHBITMAP() creates a Windows HBITMAP from an image. +% +% The format of the ImageToHBITMAP method is: +% +% HBITMAP ImageToHBITMAP(Image *image) +% +% A description of each parameter follows: +% +% o image: the image to convert. +% +*/ +MagickExport void *ImageToHBITMAP(Image *image) +{ + BITMAP + bitmap; + + ExceptionInfo + *exception; + + HANDLE + bitmap_bitsH; + + HBITMAP + bitmapH; + + register ssize_t + x; + + register const Quantum + *p; + + register RGBQUAD + *q; + + RGBQUAD + *bitmap_bits; + + size_t + length; + + ssize_t + y; + + (void) ResetMagickMemory(&bitmap,0,sizeof(bitmap)); + bitmap.bmType=0; + bitmap.bmWidth=(LONG) image->columns; + bitmap.bmHeight=(LONG) image->rows; + bitmap.bmWidthBytes=4*bitmap.bmWidth; + bitmap.bmPlanes=1; + bitmap.bmBitsPixel=32; + bitmap.bmBits=NULL; + length=bitmap.bmWidthBytes*bitmap.bmHeight; + bitmap_bitsH=(HANDLE) GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE,length); + if (bitmap_bitsH == NULL) + { + char + *message; + + message=GetExceptionMessage(errno); + (void) ThrowMagickException(&image->exception,GetMagickModule(), + ResourceLimitError,"MemoryAllocationFailed","`%s'",message); + message=DestroyString(message); + return(NULL); + } + bitmap_bits=(RGBQUAD *) GlobalLock((HGLOBAL) bitmap_bitsH); + q=bitmap_bits; + if (bitmap.bmBits == NULL) + bitmap.bmBits=bitmap_bits; + (void) TransformImageColorspace(image,RGBColorspace); + exception=(&image->exception); + for (y=0; y < (ssize_t) image->rows; y++) + { + p=GetVirtualPixels(image,0,y,image->columns,1,exception); + if (p == (const Quantum *) NULL) + break; + for (x=0; x < (ssize_t) image->columns; x++) + { + q->rgbRed=ScaleQuantumToChar(GetPixelRed(image,p)); + q->rgbGreen=ScaleQuantumToChar(GetPixelGreen(image,p)); + q->rgbBlue=ScaleQuantumToChar(GetPixelBlue(image,p)); + q->rgbReserved=0; + p+=GetPixelChannels(image); + q++; + } + } + bitmap.bmBits=bitmap_bits; + bitmapH=CreateBitmapIndirect(&bitmap); + if (bitmapH == NULL) + { + char + *message; + + message=GetExceptionMessage(errno); + (void) ThrowMagickException(&image->exception,GetMagickModule(), + ResourceLimitError,"MemoryAllocationFailed","`%s'",message); + message=DestroyString(message); + } + GlobalUnlock((HGLOBAL) bitmap_bitsH); + GlobalFree((HGLOBAL) bitmap_bitsH); + return((void *) bitmapH); +} + +#endif + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % I s W i n d o w s 9 5 % % % % % @@ -324,7 +605,7 @@ MagickExport int gettimeofday (struct timeval *time_value, % int IsWindows95() % */ -MagickExport int IsWindows95(void) +MagickPrivate int IsWindows95(void) { OSVERSIONINFO version_info; @@ -361,7 +642,7 @@ MagickExport int IsWindows95(void) % o argv: the wide-character command line arguments. % */ -MagickExport char **NTArgvToUTF8(const int argc,wchar_t **argv) +MagickPrivate char **NTArgvToUTF8(const int argc,wchar_t **argv) { char **utf8; @@ -418,7 +699,7 @@ MagickExport char **NTArgvToUTF8(const int argc,wchar_t **argv) % o entry: Specifies a pointer to a DIR structure. % */ -MagickExport int NTCloseDirectory(DIR *entry) +MagickPrivate int NTCloseDirectory(DIR *entry) { (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(entry != (DIR *) NULL); @@ -449,7 +730,7 @@ MagickExport int NTCloseDirectory(DIR *entry) % o handle: Specifies a handle to a previously loaded dynamic module. % */ -MagickExport int NTCloseLibrary(void *handle) +MagickPrivate int NTCloseLibrary(void *handle) { if (IsWindows95()) return(FreeLibrary((HINSTANCE) handle)); @@ -483,7 +764,7 @@ static BOOL ControlHandler(DWORD type) return(FALSE); } -MagickExport int NTControlHandler(void) +MagickPrivate int NTControlHandler(void) { return(SetConsoleCtrlHandler((PHANDLER_ROUTINE) ControlHandler,TRUE)); } @@ -507,7 +788,7 @@ MagickExport int NTControlHandler(void) % double NTElapsedTime(void) % */ -MagickExport double NTElapsedTime(void) +MagickPrivate double NTElapsedTime(void) { union { @@ -554,7 +835,7 @@ MagickExport double NTElapsedTime(void) % o description: Specifies any description to the reason. % */ -MagickExport void NTErrorHandler(const ExceptionType severity, +MagickPrivate void NTErrorHandler(const ExceptionType severity, const char *reason,const char *description) { char @@ -607,7 +888,7 @@ MagickExport void NTErrorHandler(const ExceptionType severity, % int NTExitLibrary(void) % */ -MagickExport int NTExitLibrary(void) +MagickPrivate int NTExitLibrary(void) { return(0); } @@ -637,7 +918,7 @@ MagickExport int NTExitLibrary(void) % random: the random data is returned here. % */ -MagickExport MagickBooleanType NTGatherRandomData(const size_t length, +MagickPrivate MagickBooleanType NTGatherRandomData(const size_t length, unsigned char *random) { #if defined(MAGICKCORE_CIPHER_SUPPORT) && defined(_MSC_VER) && (_MSC_VER > 1200) @@ -695,7 +976,7 @@ MagickExport MagickBooleanType NTGatherRandomData(const size_t length, % o extent: the maximum extent of the path. % */ -MagickExport MagickBooleanType NTGetExecutionPath(char *path, +MagickPrivate MagickBooleanType NTGetExecutionPath(char *path, const size_t extent) { GetModuleFileName(0,path,(DWORD) extent); @@ -720,7 +1001,7 @@ MagickExport MagickBooleanType NTGetExecutionPath(char *path, % char *NTGetLastError(void) % */ -char *NTGetLastError(void) +MagickPrivate char *NTGetLastError(void) { char *reason; @@ -764,7 +1045,7 @@ char *NTGetLastError(void) % const char *NTGetLibraryError(void) % */ -MagickExport const char *NTGetLibraryError(void) +MagickPrivate const char *NTGetLibraryError(void) { static char last_error[MaxTextExtent]; @@ -840,7 +1121,7 @@ void *NTGetLibrarySymbol(void *handle,const char *name) % path: the module path is returned here. % */ -MagickExport MagickBooleanType NTGetModulePath(const char *module,char *path) +MagickPrivate MagickBooleanType NTGetModulePath(const char *module,char *path) { char module_path[MaxTextExtent]; @@ -866,6 +1147,300 @@ MagickExport MagickBooleanType NTGetModulePath(const char *module,char *path) % % % % % % ++ N T G e t T y pe L i s t % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% NTLoadTypeLists() loads a Windows TrueType fonts. +% +% The format of the NTLoadTypeLists method is: +% +% MagickBooleanType NTLoadTypeLists(SplayTreeInfo *type_list) +% +% A description of each parameter follows: +% +% o type_list: A linked list of fonts. +% +*/ +MagickPrivate MagickBooleanType NTLoadTypeLists(SplayTreeInfo *type_list, + ExceptionInfo *exception) +{ + HKEY + reg_key = (HKEY) INVALID_HANDLE_VALUE; + + LONG + res; + + + int + list_entries = 0; + + char + buffer[MaxTextExtent], + system_root[MaxTextExtent], + font_root[MaxTextExtent]; + + DWORD + type, + system_root_length; + + MagickBooleanType + status; + + /* + Try to find the right Windows*\CurrentVersion key, the SystemRoot and + then the Fonts key + */ + res = RegOpenKeyExA (HKEY_LOCAL_MACHINE, + "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_READ, ®_key); + if (res == ERROR_SUCCESS) { + system_root_length=sizeof(system_root)-1; + res = RegQueryValueExA(reg_key,"SystemRoot",NULL, &type, + (BYTE*) system_root, &system_root_length); + } + if (res != ERROR_SUCCESS) { + res = RegOpenKeyExA (HKEY_LOCAL_MACHINE, + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion", 0, KEY_READ, ®_key); + if (res == ERROR_SUCCESS) { + system_root_length=sizeof(system_root)-1; + res = RegQueryValueExA(reg_key,"SystemRoot",NULL, &type, + (BYTE*)system_root, &system_root_length); + } + } + if (res == ERROR_SUCCESS) + res = RegOpenKeyExA (reg_key, "Fonts",0, KEY_READ, ®_key); + if (res != ERROR_SUCCESS) + return(MagickFalse); + *font_root='\0'; + (void) CopyMagickString(buffer,system_root,MaxTextExtent); + (void) ConcatenateMagickString(buffer,"\\fonts\\arial.ttf",MaxTextExtent); + if (IsPathAccessible(buffer) != MagickFalse) + { + (void) CopyMagickString(font_root,system_root,MaxTextExtent); + (void) ConcatenateMagickString(font_root,"\\fonts\\",MaxTextExtent); + } + else + { + (void) CopyMagickString(font_root,system_root,MaxTextExtent); + (void) ConcatenateMagickString(font_root,"\\",MaxTextExtent); + } + + { + TypeInfo + *type_info; + + DWORD + registry_index = 0, + type, + value_data_size, + value_name_length; + + char + value_data[MaxTextExtent], + value_name[MaxTextExtent]; + + res = ERROR_SUCCESS; + + while (res != ERROR_NO_MORE_ITEMS) + { + char + *family_extent, + token[MaxTextExtent], + *pos, + *q; + + value_name_length = sizeof(value_name) - 1; + value_data_size = sizeof(value_data) - 1; + res = RegEnumValueA ( reg_key, registry_index, value_name, + &value_name_length, 0, &type, (BYTE*)value_data, &value_data_size); + registry_index++; + if (res != ERROR_SUCCESS) + continue; + if ( (pos = strstr(value_name, " (TrueType)")) == (char*) NULL ) + continue; + *pos='\0'; /* Remove (TrueType) from string */ + + type_info=(TypeInfo *) AcquireMagickMemory(sizeof(*type_info)); + if (type_info == (TypeInfo *) NULL) + ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); + (void) ResetMagickMemory(type_info,0,sizeof(TypeInfo)); + + type_info->path=ConstantString("Windows Fonts"); + type_info->signature=MagickSignature; + + /* Name */ + (void) CopyMagickString(buffer,value_name,MaxTextExtent); + for(pos = buffer; *pos != 0 ; pos++) + if (*pos == ' ') + *pos = '-'; + type_info->name=ConstantString(buffer); + + /* Fullname */ + type_info->description=ConstantString(value_name); + + /* Format */ + type_info->format=ConstantString("truetype"); + + /* Glyphs */ + if (strchr(value_data,'\\') != (char *) NULL) + (void) CopyMagickString(buffer,value_data,MaxTextExtent); + else + { + (void) CopyMagickString(buffer,font_root,MaxTextExtent); + (void) ConcatenateMagickString(buffer,value_data,MaxTextExtent); + } + + LocaleLower(buffer); + type_info->glyphs=ConstantString(buffer); + + type_info->stretch=NormalStretch; + type_info->style=NormalStyle; + type_info->weight=400; + + /* Some fonts are known to require special encodings */ + if ( (LocaleCompare(type_info->name, "Symbol") == 0 ) || + (LocaleCompare(type_info->name, "Wingdings") == 0 ) || + (LocaleCompare(type_info->name, "Wingdings-2") == 0 ) || + (LocaleCompare(type_info->name, "Wingdings-3") == 0 ) ) + type_info->encoding=ConstantString("AppleRoman"); + + family_extent=value_name; + + for (q=value_name; *q != '\0'; ) + { + GetMagickToken(q,(const char **) &q,token); + if (*token == '\0') + break; + + if (LocaleCompare(token,"Italic") == 0) + { + type_info->style=ItalicStyle; + } + + else if (LocaleCompare(token,"Oblique") == 0) + { + type_info->style=ObliqueStyle; + } + + else if (LocaleCompare(token,"Bold") == 0) + { + type_info->weight=700; + } + + else if (LocaleCompare(token,"Thin") == 0) + { + type_info->weight=100; + } + + else if ( (LocaleCompare(token,"ExtraLight") == 0) || + (LocaleCompare(token,"UltraLight") == 0) ) + { + type_info->weight=200; + } + + else if (LocaleCompare(token,"Light") == 0) + { + type_info->weight=300; + } + + else if ( (LocaleCompare(token,"Normal") == 0) || + (LocaleCompare(token,"Regular") == 0) ) + { + type_info->weight=400; + } + + else if (LocaleCompare(token,"Medium") == 0) + { + type_info->weight=500; + } + + else if ( (LocaleCompare(token,"SemiBold") == 0) || + (LocaleCompare(token,"DemiBold") == 0) ) + { + type_info->weight=600; + } + + else if ( (LocaleCompare(token,"ExtraBold") == 0) || + (LocaleCompare(token,"UltraBold") == 0) ) + { + type_info->weight=800; + } + + else if ( (LocaleCompare(token,"Heavy") == 0) || + (LocaleCompare(token,"Black") == 0) ) + { + type_info->weight=900; + } + + else if (LocaleCompare(token,"Condensed") == 0) + { + type_info->stretch = CondensedStretch; + } + + else if (LocaleCompare(token,"Expanded") == 0) + { + type_info->stretch = ExpandedStretch; + } + + else if (LocaleCompare(token,"ExtraCondensed") == 0) + { + type_info->stretch = ExtraCondensedStretch; + } + + else if (LocaleCompare(token,"ExtraExpanded") == 0) + { + type_info->stretch = ExtraExpandedStretch; + } + + else if (LocaleCompare(token,"SemiCondensed") == 0) + { + type_info->stretch = SemiCondensedStretch; + } + + else if (LocaleCompare(token,"SemiExpanded") == 0) + { + type_info->stretch = SemiExpandedStretch; + } + + else if (LocaleCompare(token,"UltraCondensed") == 0) + { + type_info->stretch = UltraCondensedStretch; + } + + else if (LocaleCompare(token,"UltraExpanded") == 0) + { + type_info->stretch = UltraExpandedStretch; + } + + else + { + family_extent=q; + } + } + + (void) CopyMagickString(buffer,value_name,family_extent-value_name+1); + StripString(buffer); + type_info->family=ConstantString(buffer); + + list_entries++; + status=AddValueToSplayTree(type_list,ConstantString(type_info->name), + type_info); + if (status == MagickFalse) + (void) ThrowMagickException(exception,GetMagickModule(), + ResourceLimitError,"MemoryAllocationFailed","`%s'",type_info->name); + } + } + RegCloseKey ( reg_key ); + return(MagickTrue); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % N T G h o s t s c r i p t D L L % % % % % @@ -1072,7 +1647,7 @@ static int NTGhostscriptGetString(const char *name,char *value, return(FALSE); } -MagickExport int NTGhostscriptDLL(char *path,int length) +MagickPrivate int NTGhostscriptDLL(char *path,int length) { static char dll[MaxTextExtent] = { "" }; @@ -1106,7 +1681,7 @@ MagickExport int NTGhostscriptDLL(char *path,int length) % const GhostInfo *NTGhostscriptDLLVectors(void) % */ -MagickExport const GhostInfo *NTGhostscriptDLLVectors(void) +MagickPrivate const GhostInfo *NTGhostscriptDLLVectors(void) { if (NTGhostscriptLoadDLL() == FALSE) return((GhostInfo *) NULL); @@ -1139,7 +1714,7 @@ MagickExport const GhostInfo *NTGhostscriptDLLVectors(void) % o length: length of buffer. % */ -MagickExport int NTGhostscriptEXE(char *path,int length) +MagickPrivate int NTGhostscriptEXE(char *path,int length) { register char *p; @@ -1187,7 +1762,7 @@ MagickExport int NTGhostscriptEXE(char *path,int length) % o length: length of the path buffer. % */ -MagickExport int NTGhostscriptFonts(char *path,int length) +MagickPrivate int NTGhostscriptFonts(char *path,int length) { char buffer[MaxTextExtent], @@ -1233,7 +1808,7 @@ MagickExport int NTGhostscriptFonts(char *path,int length) % int NTGhostscriptLoadDLL(void) % */ -MagickExport int NTGhostscriptLoadDLL(void) +MagickPrivate int NTGhostscriptLoadDLL(void) { char path[MaxTextExtent]; @@ -1282,7 +1857,7 @@ MagickExport int NTGhostscriptLoadDLL(void) % int NTGhostscriptUnLoadDLL(void) % */ -MagickExport int NTGhostscriptUnLoadDLL(void) +MagickPrivate int NTGhostscriptUnLoadDLL(void) { int status; @@ -1313,7 +1888,7 @@ MagickExport int NTGhostscriptUnLoadDLL(void) % int NTInitializeLibrary(void) % */ -MagickExport int NTInitializeLibrary(void) +MagickPrivate int NTInitializeLibrary(void) { return(0); } @@ -1323,6 +1898,42 @@ MagickExport int NTInitializeLibrary(void) % % % % % % +% N T I s M a g i c k C o n f l i c t % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% NTIsMagickConflict() returns true if the image format conflicts with a +% logical drive (.e.g. X:). +% +% The format of the IsMagickConflict method is: +% +% MagickBooleanType IsMagickConflict(const char *magick) +% +% A description of each parameter follows: +% +% o magick: Specifies the image format. +% +*/ +MagickPrivate MagickBooleanType NTIsMagickConflict(const char *magick) +{ + MagickBooleanType + status; + + assert(magick != (char *) NULL); + if (strlen(magick) > 1) + return(MagickFalse); + status=(GetLogicalDrives() & (1 << ((toupper((int) (*magick)))-'A'))) != 0 ? + MagickTrue : MagickFalse; + return(status); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % + N T M a p M e m o r y % % % % % @@ -1333,11 +1944,11 @@ MagickExport int NTInitializeLibrary(void) % % The format of the NTMapMemory method is: % -% MagickExport void *NTMapMemory(char *address,size_t length,int protection, +% MagickPrivate void *NTMapMemory(char *address,size_t length,int protection, % int access,int file,MagickOffsetType offset) % */ -MagickExport void *NTMapMemory(char *address,size_t length,int protection, +MagickPrivate void *NTMapMemory(char *address,size_t length,int protection, int flags,int file,MagickOffsetType offset) { DWORD @@ -1422,7 +2033,7 @@ MagickExport void *NTMapMemory(char *address,size_t length,int protection, % o entry: Specifies a pointer to a DIR structure. % */ -MagickExport DIR *NTOpenDirectory(const char *path) +MagickPrivate DIR *NTOpenDirectory(const char *path) { char file_specification[MaxTextExtent]; @@ -1499,7 +2110,7 @@ static const char *GetSearchPath( void ) #endif } -MagickExport void *NTOpenLibrary(const char *filename) +MagickPrivate void *NTOpenLibrary(const char *filename) { #define MaxPathElements 31 @@ -1580,7 +2191,7 @@ MagickExport void *NTOpenLibrary(const char *filename) % o entry: Specifies a pointer to a DIR structure. % */ -MagickExport struct dirent *NTReadDirectory(DIR *entry) +MagickPrivate struct dirent *NTReadDirectory(DIR *entry) { int status; @@ -1636,7 +2247,7 @@ MagickExport struct dirent *NTReadDirectory(DIR *entry) % "LibPath", "CoderModulesPath", "FilterModulesPath", "SharePath". % */ -MagickExport unsigned char *NTRegistryKeyLookup(const char *subkey) +MagickPrivate unsigned char *NTRegistryKeyLookup(const char *subkey) { char package_key[MaxTextExtent]; @@ -1720,7 +2331,7 @@ MagickExport unsigned char *NTRegistryKeyLookup(const char *subkey) % o error: MagickTrue the event is an error. % */ -MagickExport MagickBooleanType NTReportEvent(const char *event, +MagickPrivate MagickBooleanType NTReportEvent(const char *event, const MagickBooleanType error) { const char @@ -1767,7 +2378,7 @@ MagickExport MagickBooleanType NTReportEvent(const char *event, % o id: Specifies a string that identifies the resource. % */ -MagickExport unsigned char *NTResourceToBlob(const char *id) +MagickPrivate unsigned char *NTResourceToBlob(const char *id) { char path[MaxTextExtent]; @@ -1849,7 +2460,7 @@ MagickExport unsigned char *NTResourceToBlob(const char *id) % stream. % */ -MagickExport void NTSeekDirectory(DIR *entry,ssize_t position) +MagickPrivate void NTSeekDirectory(DIR *entry,ssize_t position) { (void) position; (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); @@ -1880,7 +2491,7 @@ MagickExport void NTSeekDirectory(DIR *entry,ssize_t position) % for DLL's that can be dynamically loaded. % */ -MagickExport int NTSetSearchPath(const char *path) +MagickPrivate int NTSetSearchPath(const char *path) { #if defined(MAGICKCORE_LTDL_DELEGATE) lt_dlsetsearchpath(path); @@ -1919,7 +2530,7 @@ MagickExport int NTSetSearchPath(const char *path) % o flags: Option flags (ignored for Windows). % */ -MagickExport int NTSyncMemory(void *address,size_t length,int flags) +MagickPrivate int NTSyncMemory(void *address,size_t length,int flags) { (void) flags; if (FlushViewOfFile(address,length) == MagickFalse) @@ -1950,7 +2561,7 @@ MagickExport int NTSyncMemory(void *address,size_t length,int flags) % o command: This string is the command to execute. % */ -MagickExport int NTSystemCommand(const char *command) +MagickPrivate int NTSystemCommand(const char *command) { char local_command[MaxTextExtent]; @@ -2026,7 +2637,7 @@ MagickExport int NTSystemCommand(const char *command) % o name: _SC_PAGE_SIZE or _SC_PHYS_PAGES. % */ -MagickExport ssize_t NTSystemConfiguration(int name) +MagickPrivate ssize_t NTSystemConfiguration(int name) { switch (name) { @@ -2101,7 +2712,7 @@ MagickExport ssize_t NTSystemConfiguration(int name) % o entry: Specifies a pointer to a DIR structure. % */ -MagickExport ssize_t NTTellDirectory(DIR *entry) +MagickPrivate ssize_t NTTellDirectory(DIR *entry) { assert(entry != (DIR *) NULL); return(0); @@ -2131,7 +2742,7 @@ MagickExport ssize_t NTTellDirectory(DIR *entry) % o length: the file length. % */ -MagickExport int NTTruncateFile(int file,off_t length) +MagickPrivate int NTTruncateFile(int file,off_t length) { DWORD file_pointer; @@ -2178,7 +2789,7 @@ MagickExport int NTTruncateFile(int file,off_t length) % o length: the length of the binary large object. % */ -MagickExport int NTUnmapMemory(void *map,size_t length) +MagickPrivate int NTUnmapMemory(void *map,size_t length) { (void) length; if (UnmapViewOfFile(map) == 0) @@ -2205,7 +2816,7 @@ MagickExport int NTUnmapMemory(void *map,size_t length) % double NTUserTime(void) % */ -MagickExport double NTUserTime(void) +MagickPrivate double NTUserTime(void) { DWORD status; @@ -2274,7 +2885,7 @@ MagickExport double NTUserTime(void) % o description: Specifies any description to the reason. % */ -MagickExport void NTWarningHandler(const ExceptionType severity, +MagickPrivate void NTWarningHandler(const ExceptionType severity, const char *reason,const char *description) { char diff --git a/MagickCore/nt-base.h b/MagickCore/nt-base.h index f758d926a..f0e33a603 100644 --- a/MagickCore/nt-base.h +++ b/MagickCore/nt-base.h @@ -1,12 +1,12 @@ /* Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available. - + You may not use this file except in compliance with the License. obtain a copy of the License at - + http://www.imagemagick.org/script/license.php - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,407 +22,16 @@ extern "C" { #endif -#include "MagickCore/delegate.h" -#include "MagickCore/delegate-private.h" -#include "MagickCore/exception.h" - -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN -#define _CRT_SECURE_NO_DEPRECATE 1 -#include -#include -#include -#include -#include -#include -#include -#if defined(_DEBUG) && !defined(__MINGW32__) -#include -#endif - -#define PROT_READ 0x01 -#define PROT_WRITE 0x02 -#define MAP_SHARED 0x01 -#define MAP_PRIVATE 0x02 -#define MAP_ANONYMOUS 0x20 -#define F_OK 0 -#define R_OK 4 -#define W_OK 2 -#define RW_OK 6 -#define _SC_PAGESIZE 1 -#define _SC_PHYS_PAGES 2 -#define _SC_OPEN_MAX 3 -#if !defined(SSIZE_MAX) -#define SSIZE_MAX 0x7fffffffL -#endif - -/* - _MSC_VER values: - 1100 MSVC 5.0 - 1200 MSVC 6.0 - 1300 MSVC 7.0 Visual C++ .NET 2002 - 1310 Visual c++ .NET 2003 - 1400 Visual C++ 2005 - 1500 Visual C++ 2008 -*/ - -#if !defined(chsize) -# if defined(__BORLANDC__) -# define chsize(file,length) chsize(file,length) -# else -# define chsize(file,length) _chsize(file,length) -# endif -#endif - -#if !defined(access) -#if defined(_VISUALC_) && (_MSC_VER >= 1400) -# define access(path,mode) _access_s(path,mode) -#endif -#endif -#if !defined(chdir) -# define chdir _chdir -#endif -#if !defined(close) -# define close _close -#endif -#if !defined(closedir) -# define closedir(directory) NTCloseDirectory(directory) -#endif -#if !defined(fdopen) -# define fdopen _fdopen -#endif -#if !defined(fileno) -# define fileno _fileno -#endif -#if !defined(fseek) && !defined(__MINGW32__) -#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ - !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) -# define fseek _fseeki64 -#endif -#endif -#if !defined(fstat) && !defined(__BORLANDC__) -#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ - !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) -# define fstat _fstati64 -#else -# define fstat _fstat -#endif -#endif -#if !defined(fsync) -# define fsync _commit -#endif -#if !defined(ftell) && !defined(__MINGW32__) -#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ - !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) -# define ftell _ftelli64 -#endif -#endif -#if !defined(ftruncate) -# define ftruncate(file,length) NTTruncateFile(file,length) -#endif -#if !defined(getcwd) -# define getcwd _getcwd -#endif -#if !defined(getpid) -# define getpid _getpid -#endif -#if !defined(hypot) -# define hypot _hypot -#endif -#if !defined(inline) -# define inline __inline -#endif -#if !defined(isatty) -# define isatty _isatty -#endif -#if !defined(locale_t) -#define locale_t _locale_t -#endif -#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ - !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) -# define lseek _lseeki64 -#else -# define lseek _lseek -#endif -#if !defined(MAGICKCORE_LTDL_DELEGATE) -#if !defined(lt_dlclose) -# define lt_dlclose(handle) NTCloseLibrary(handle) -#endif -#if !defined(lt_dlerror) -# define lt_dlerror() NTGetLibraryError() -#endif -#if !defined(lt_dlexit) -# define lt_dlexit() NTExitLibrary() -#endif -#if !defined(lt_dlinit) -# define lt_dlinit() NTInitializeLibrary() -#endif -#if !defined(lt_dlopen) -# define lt_dlopen(filename) NTOpenLibrary(filename) -#endif -#if !defined(lt_dlsetsearchpath) -# define lt_dlsetsearchpath(path) NTSetSearchPath(path) -#endif -#if !defined(lt_dlsym) -# define lt_dlsym(handle,name) NTGetLibrarySymbol(handle,name) -#endif -#endif -#if !defined(mkdir) -# define mkdir _mkdir -#endif -#if !defined(mmap) -# define mmap(address,length,protection,access,file,offset) \ - NTMapMemory(address,length,protection,access,file,offset) -#endif -#if !defined(msync) -# define msync(address,length,flags) NTSyncMemory(address,length,flags) -#endif -#if !defined(munmap) -# define munmap(address,length) NTUnmapMemory(address,length) -#endif -#if !defined(opendir) -# define opendir(directory) NTOpenDirectory(directory) -#endif -#if !defined(open) -# define open _open -#endif -#if !defined(pclose) -# define pclose _pclose -#endif -#if !defined(popen) -# define popen _popen -#endif -#if !defined(fprintf_l) -#define fprintf_l _fprintf_s_l -#endif -#if !defined(read) -# define read _read -#endif -#if !defined(readdir) -# define readdir(directory) NTReadDirectory(directory) -#endif -#if !defined(seekdir) -# define seekdir(directory,offset) NTSeekDirectory(directory,offset) -#endif -#if !defined(setmode) -# define setmode _setmode -#endif -#if !defined(spawnvp) -# define spawnvp _spawnvp -#endif -#if !defined(strtod_l) -#define strtod_l _strtod_l -#endif -#if !defined(stat) && !defined(__BORLANDC__) -#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ - !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) -# define stat _stati64 -#else -# define stat _stat -#endif -#endif -#if !defined(strcasecmp) -# define strcasecmp _strcmpi -#endif -#if !defined(strncasecmp) -# define strncasecmp _strnicmp -#endif -#if !defined(sysconf) -# define sysconf(name) NTSystemConfiguration(name) -#endif -#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ - !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) -# define tell _telli64 -#else -# define tell _tell -#endif -#if !defined(telldir) -# define telldir(directory) NTTellDirectory(directory) -#endif -#if !defined(tempnam) -# define tempnam _tempnam_s -#endif -#if !defined(vfprintf_l) -#define vfprintf_l _vfprintf_l -#endif -#if !defined(vsnprintf) -#if !defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1500) -#define vsnprintf _vsnprintf -#endif -#endif -#if !defined(vsnprintf_l) -#define vsnprintf_l _vsnprintf_l -#endif -#if !defined(write) -# define write _write -#endif -#if !defined(wstat) && !defined(__BORLANDC__) -#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(Windows95) && \ - !(defined(_MSC_VER) && (_MSC_VER < 1400)) && (__MSVCRT_VERSION__ < 0x800) -# define wstat _wstati64 -#else -# define wstat _wstat -#endif -#endif - -#if defined(_MT) && defined(MAGICKCORE_WINDOWS_SUPPORT) -# define SAFE_GLOBAL __declspec(thread) -#else -# define SAFE_GLOBAL -#endif - -#if defined(__BORLANDC__) -#undef _O_RANDOM -#define _O_RANDOM 0 -#undef _O_SEQUENTIAL -#define _O_SEQUENTIAL 0 -#undef _O_SHORT_LIVED -#define _O_SHORT_LIVED 0 -#undef _O_TEMPORARY -#define _O_TEMPORARY 0 -#endif - -#undef gettimeofday - -#if !defined(XS_VERSION) -struct dirent -{ - char - d_name[2048]; - - int - d_namlen; -}; - -typedef struct _DIR -{ - HANDLE - hSearch; - - WIN32_FIND_DATA - Win32FindData; - - BOOL - firsttime; - - struct dirent - file_info; -} DIR; - -typedef struct _NTMEMORYSTATUSEX -{ - DWORD - dwLength, - dwMemoryLoad; - - DWORDLONG - ullTotalPhys, - ullAvailPhys, - ullTotalPageFile, - ullAvailPageFile, - ullTotalVirtual, - ullAvailVirtual, - ullAvailExtendedVirtual; -} NTMEMORYSTATUSEX; - -#if !defined(__MINGW32__) -struct timezone -{ - int - tz_minuteswest, - tz_dsttime; -}; -#endif - -typedef UINT - (CALLBACK *LPFNDLLFUNC1)(DWORD,UINT); - -typedef UINT - (CALLBACK *LPFNDLLFUNC2)(NTMEMORYSTATUSEX *); - -#endif - -#if defined(MAGICKCORE_BZLIB_DELEGATE) -# if defined(_WIN32) -# define BZ_IMPORT 1 -# endif -#endif - -extern MagickExport char - *NTGetLastError(void), - **NTArgvToUTF8(const int argc,wchar_t **); - -extern MagickExport const GhostInfo - *NTGhostscriptDLLVectors(void); - -#if !defined(MAGICKCORE_LTDL_DELEGATE) -extern MagickExport const char - *NTGetLibraryError(void); -#endif - -#if !defined(XS_VERSION) -extern MagickExport const char - *NTGetLibraryError(void); - -extern MagickExport DIR - *NTOpenDirectory(const char *); - -extern MagickExport double - NTElapsedTime(void), - NTUserTime(void); - -extern MagickExport int - Exit(int), -#if !defined(__MINGW32__) - gettimeofday(struct timeval *,struct timezone *), -#endif - IsWindows95(void), - NTCloseDirectory(DIR *), - NTCloseLibrary(void *), - NTControlHandler(void), - NTExitLibrary(void), - NTTruncateFile(int,off_t), - NTGhostscriptDLL(char *,int), - NTGhostscriptEXE(char *,int), - NTGhostscriptFonts(char *,int), - NTGhostscriptLoadDLL(void), - NTGhostscriptUnLoadDLL(void), - NTInitializeLibrary(void), - NTSetSearchPath(const char *), - NTSyncMemory(void *,size_t,int), - NTUnmapMemory(void *,size_t), - NTSystemCommand(const char *); - -extern MagickExport ssize_t - NTSystemConfiguration(int), - NTTellDirectory(DIR *); - -extern MagickExport MagickBooleanType - NTGatherRandomData(const size_t,unsigned char *), - NTGetExecutionPath(char *,const size_t), - NTGetModulePath(const char *,char *), - NTReportEvent(const char *,const MagickBooleanType), - NTReportException(const char *,const MagickBooleanType); - -extern MagickExport struct dirent - *NTReadDirectory(DIR *); - -extern MagickExport unsigned char - *NTRegistryKeyLookup(const char *), - *NTResourceToBlob(const char *); +#include "MagickCore/splay-tree.h" +#if defined(MAGICKCORE_WINDOWS_SUPPORT) extern MagickExport void - NTErrorHandler(const ExceptionType,const char *,const char *), - *NTGetLibrarySymbol(void *,const char *), - *NTMapMemory(char *,size_t,int,int,int,MagickOffsetType), - *NTOpenLibrary(const char *), - NTSeekDirectory(DIR *,ssize_t), - NTWarningHandler(const ExceptionType,const char *,const char *); - -#endif /* !XS_VERSION */ + *CropImageToHBITMAP(Image *,const RectangleInfo *,ExceptionInfo *), + *ImageToHBITMAP(Image *); +#endif #if defined(__cplusplus) || defined(c_plusplus) } -#endif /* !C++ */ +#endif -#endif /* !_MAGICKCORE_NT_BASE_H */ +#endif diff --git a/MagickCore/nt-feature.c b/MagickCore/nt-feature.c deleted file mode 100644 index 47730a928..000000000 --- a/MagickCore/nt-feature.c +++ /dev/null @@ -1,674 +0,0 @@ -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -% % -% N N TTTTT % -% NN N T % -% N N N T % -% N NN T % -% N N T % -% % -% % -% Windows NT Feature Methods for MagickCore % -% % -% Software Design % -% John Cristy % -% December 1996 % -% % -% % -% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization % -% dedicated to making software imaging solutions freely available. % -% % -% You may not use this file except in compliance with the License. You may % -% obtain a copy of the License at % -% % -% http://www.imagemagick.org/script/license.php % -% % -% Unless required by applicable law or agreed to in writing, software % -% distributed under the License is distributed on an "AS IS" BASIS, % -% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % -% See the License for the specific language governing permissions and % -% limitations under the License. % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% -*/ - -/* - Include declarations. -*/ -#include "MagickCore/studio.h" -#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN -#include -#include "MagickCore/cache.h" -#include "MagickCore/colorspace.h" -#include "MagickCore/colorspace-private.h" -#include "MagickCore/draw.h" -#include "MagickCore/exception.h" -#include "MagickCore/exception-private.h" -#include "MagickCore/image-private.h" -#include "MagickCore/memory_.h" -#include "MagickCore/monitor.h" -#include "MagickCore/monitor-private.h" -#include "MagickCore/pixel-accessor.h" -#include "MagickCore/quantum.h" -#include "MagickCore/string_.h" -#include "MagickCore/token.h" -#include "MagickCore/splay-tree.h" -#include "MagickCore/utility.h" -#include "MagickCore/nt-feature.h" - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -% C r o p I m a g e T o H B i t m a p % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% CropImageToHBITMAP() extracts a specified region of the image and returns -% it as a Windows HBITMAP. While the same functionality can be accomplished by -% invoking CropImage() followed by ImageToHBITMAP(), this method is more -% efficient since it copies pixels directly to the HBITMAP. -% -% The format of the CropImageToHBITMAP method is: -% -% HBITMAP CropImageToHBITMAP(Image* image,const RectangleInfo *geometry, -% ExceptionInfo *exception) -% -% A description of each parameter follows: -% -% o image: the image. -% -% o geometry: Define the region of the image to crop with members -% x, y, width, and height. -% -% o exception: return any errors or warnings in this structure. -% -*/ -MagickExport void *CropImageToHBITMAP(Image *image, - const RectangleInfo *geometry,ExceptionInfo *exception) -{ -#define CropImageTag "Crop/Image" - - BITMAP - bitmap; - - HBITMAP - bitmapH; - - HANDLE - bitmap_bitsH; - - MagickBooleanType - proceed; - - RectangleInfo - page; - - register const Quantum - *p; - - register RGBQUAD - *q; - - RGBQUAD - *bitmap_bits; - - ssize_t - y; - - /* - Check crop geometry. - */ - assert(image != (const Image *) NULL); - assert(image->signature == MagickSignature); - if (image->debug != MagickFalse) - (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - assert(geometry != (const RectangleInfo *) NULL); - assert(exception != (ExceptionInfo *) NULL); - assert(exception->signature == MagickSignature); - if (((geometry->x+(ssize_t) geometry->width) < 0) || - ((geometry->y+(ssize_t) geometry->height) < 0) || - (geometry->x >= (ssize_t) image->columns) || - (geometry->y >= (ssize_t) image->rows)) - ThrowImageException(OptionError,"GeometryDoesNotContainImage"); - page=(*geometry); - if ((page.x+(ssize_t) page.width) > (ssize_t) image->columns) - page.width=image->columns-page.x; - if ((page.y+(ssize_t) page.height) > (ssize_t) image->rows) - page.height=image->rows-page.y; - if (page.x < 0) - { - page.width+=page.x; - page.x=0; - } - if (page.y < 0) - { - page.height+=page.y; - page.y=0; - } - - if ((page.width == 0) || (page.height == 0)) - ThrowImageException(OptionError,"GeometryDimensionsAreZero"); - /* - Initialize crop image attributes. - */ - bitmap.bmType = 0; - bitmap.bmWidth = (LONG) page.width; - bitmap.bmHeight = (LONG) page.height; - bitmap.bmWidthBytes = bitmap.bmWidth * 4; - bitmap.bmPlanes = 1; - bitmap.bmBitsPixel = 32; - bitmap.bmBits = NULL; - - bitmap_bitsH=(HANDLE) GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE,page.width* - page.height*bitmap.bmBitsPixel); - if (bitmap_bitsH == NULL) - return(NULL); - bitmap_bits=(RGBQUAD *) GlobalLock((HGLOBAL) bitmap_bitsH); - if ( bitmap.bmBits == NULL ) - bitmap.bmBits = bitmap_bits; - if (IsRGBColorspace(image->colorspace) == MagickFalse) - TransformImageColorspace(image,RGBColorspace); - /* - Extract crop image. - */ - q=bitmap_bits; - for (y=0; y < (ssize_t) page.height; y++) - { - p=GetVirtualPixels(image,page.x,page.y+y,page.width,1,exception); - if (p == (const Quantum *) NULL) - break; - -#if MAGICKCORE_QUANTUM_DEPTH == 8 - /* Form of PixelPacket is identical to RGBQUAD when MAGICKCORE_QUANTUM_DEPTH==8 */ - CopyMagickMemory((void*)q,(const void*)p,page.width*sizeof(PixelPacket)); - q += page.width; - -#else /* 16 or 32 bit Quantum */ - { - ssize_t - x; - - /* Transfer pixels, scaling to Quantum */ - for( x=(ssize_t) page.width ; x> 0 ; x-- ) - { - q->rgbRed = ScaleQuantumToChar(GetPixelRed(image,p)); - q->rgbGreen = ScaleQuantumToChar(GetPixelGreen(image,p)); - q->rgbBlue = ScaleQuantumToChar(GetPixelBlue(image,p)); - q->rgbReserved = 0; - ++q; - ++p; - } - } -#endif - proceed=SetImageProgress(image,CropImageTag,y,page.height); - if (proceed == MagickFalse) - break; - } - if (y < (ssize_t) page.height) - { - GlobalUnlock((HGLOBAL) bitmap_bitsH); - GlobalFree((HGLOBAL) bitmap_bitsH); - return((void *) NULL); - } - bitmap.bmBits=bitmap_bits; - bitmapH=CreateBitmapIndirect(&bitmap); - GlobalUnlock((HGLOBAL) bitmap_bitsH); - GlobalFree((HGLOBAL) bitmap_bitsH); - return((void *) bitmapH); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -% I s M a g i c k C o n f l i c t % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% IsMagickConflict() returns true if the image format conflicts with a logical -% drive (.e.g. X:). -% -% The format of the IsMagickConflict method is: -% -% MagickBooleanType IsMagickConflict(const char *magick) -% -% A description of each parameter follows: -% -% o magick: Specifies the image format. -% -*/ -MagickExport MagickBooleanType NTIsMagickConflict(const char *magick) -{ - MagickBooleanType - status; - - assert(magick != (char *) NULL); - if (strlen(magick) > 1) - return(MagickFalse); - status=(GetLogicalDrives() & (1 << ((toupper((int) (*magick)))-'A'))) != 0 ? - MagickTrue : MagickFalse; - return(status); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -+ N T G e t T y pe L i s t % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% NTLoadTypeLists() loads a Windows TrueType fonts. -% -% The format of the NTLoadTypeLists method is: -% -% MagickBooleanType NTLoadTypeLists(SplayTreeInfo *type_list) -% -% A description of each parameter follows: -% -% o type_list: A linked list of fonts. -% -*/ -MagickExport MagickBooleanType NTLoadTypeLists(SplayTreeInfo *type_list, - ExceptionInfo *exception) -{ - HKEY - reg_key = (HKEY) INVALID_HANDLE_VALUE; - - LONG - res; - - - int - list_entries = 0; - - char - buffer[MaxTextExtent], - system_root[MaxTextExtent], - font_root[MaxTextExtent]; - - DWORD - type, - system_root_length; - - MagickBooleanType - status; - - /* - Try to find the right Windows*\CurrentVersion key, the SystemRoot and - then the Fonts key - */ - res = RegOpenKeyExA (HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_READ, ®_key); - if (res == ERROR_SUCCESS) { - system_root_length=sizeof(system_root)-1; - res = RegQueryValueExA(reg_key,"SystemRoot",NULL, &type, - (BYTE*) system_root, &system_root_length); - } - if (res != ERROR_SUCCESS) { - res = RegOpenKeyExA (HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion", 0, KEY_READ, ®_key); - if (res == ERROR_SUCCESS) { - system_root_length=sizeof(system_root)-1; - res = RegQueryValueExA(reg_key,"SystemRoot",NULL, &type, - (BYTE*)system_root, &system_root_length); - } - } - if (res == ERROR_SUCCESS) - res = RegOpenKeyExA (reg_key, "Fonts",0, KEY_READ, ®_key); - if (res != ERROR_SUCCESS) - return(MagickFalse); - *font_root='\0'; - (void) CopyMagickString(buffer,system_root,MaxTextExtent); - (void) ConcatenateMagickString(buffer,"\\fonts\\arial.ttf",MaxTextExtent); - if (IsPathAccessible(buffer) != MagickFalse) - { - (void) CopyMagickString(font_root,system_root,MaxTextExtent); - (void) ConcatenateMagickString(font_root,"\\fonts\\",MaxTextExtent); - } - else - { - (void) CopyMagickString(font_root,system_root,MaxTextExtent); - (void) ConcatenateMagickString(font_root,"\\",MaxTextExtent); - } - - { - TypeInfo - *type_info; - - DWORD - registry_index = 0, - type, - value_data_size, - value_name_length; - - char - value_data[MaxTextExtent], - value_name[MaxTextExtent]; - - res = ERROR_SUCCESS; - - while (res != ERROR_NO_MORE_ITEMS) - { - char - *family_extent, - token[MaxTextExtent], - *pos, - *q; - - value_name_length = sizeof(value_name) - 1; - value_data_size = sizeof(value_data) - 1; - res = RegEnumValueA ( reg_key, registry_index, value_name, - &value_name_length, 0, &type, (BYTE*)value_data, &value_data_size); - registry_index++; - if (res != ERROR_SUCCESS) - continue; - if ( (pos = strstr(value_name, " (TrueType)")) == (char*) NULL ) - continue; - *pos='\0'; /* Remove (TrueType) from string */ - - type_info=(TypeInfo *) AcquireMagickMemory(sizeof(*type_info)); - if (type_info == (TypeInfo *) NULL) - ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); - (void) ResetMagickMemory(type_info,0,sizeof(TypeInfo)); - - type_info->path=ConstantString("Windows Fonts"); - type_info->signature=MagickSignature; - - /* Name */ - (void) CopyMagickString(buffer,value_name,MaxTextExtent); - for(pos = buffer; *pos != 0 ; pos++) - if (*pos == ' ') - *pos = '-'; - type_info->name=ConstantString(buffer); - - /* Fullname */ - type_info->description=ConstantString(value_name); - - /* Format */ - type_info->format=ConstantString("truetype"); - - /* Glyphs */ - if (strchr(value_data,'\\') != (char *) NULL) - (void) CopyMagickString(buffer,value_data,MaxTextExtent); - else - { - (void) CopyMagickString(buffer,font_root,MaxTextExtent); - (void) ConcatenateMagickString(buffer,value_data,MaxTextExtent); - } - - LocaleLower(buffer); - type_info->glyphs=ConstantString(buffer); - - type_info->stretch=NormalStretch; - type_info->style=NormalStyle; - type_info->weight=400; - - /* Some fonts are known to require special encodings */ - if ( (LocaleCompare(type_info->name, "Symbol") == 0 ) || - (LocaleCompare(type_info->name, "Wingdings") == 0 ) || - (LocaleCompare(type_info->name, "Wingdings-2") == 0 ) || - (LocaleCompare(type_info->name, "Wingdings-3") == 0 ) ) - type_info->encoding=ConstantString("AppleRoman"); - - family_extent=value_name; - - for (q=value_name; *q != '\0'; ) - { - GetMagickToken(q,(const char **) &q,token); - if (*token == '\0') - break; - - if (LocaleCompare(token,"Italic") == 0) - { - type_info->style=ItalicStyle; - } - - else if (LocaleCompare(token,"Oblique") == 0) - { - type_info->style=ObliqueStyle; - } - - else if (LocaleCompare(token,"Bold") == 0) - { - type_info->weight=700; - } - - else if (LocaleCompare(token,"Thin") == 0) - { - type_info->weight=100; - } - - else if ( (LocaleCompare(token,"ExtraLight") == 0) || - (LocaleCompare(token,"UltraLight") == 0) ) - { - type_info->weight=200; - } - - else if (LocaleCompare(token,"Light") == 0) - { - type_info->weight=300; - } - - else if ( (LocaleCompare(token,"Normal") == 0) || - (LocaleCompare(token,"Regular") == 0) ) - { - type_info->weight=400; - } - - else if (LocaleCompare(token,"Medium") == 0) - { - type_info->weight=500; - } - - else if ( (LocaleCompare(token,"SemiBold") == 0) || - (LocaleCompare(token,"DemiBold") == 0) ) - { - type_info->weight=600; - } - - else if ( (LocaleCompare(token,"ExtraBold") == 0) || - (LocaleCompare(token,"UltraBold") == 0) ) - { - type_info->weight=800; - } - - else if ( (LocaleCompare(token,"Heavy") == 0) || - (LocaleCompare(token,"Black") == 0) ) - { - type_info->weight=900; - } - - else if (LocaleCompare(token,"Condensed") == 0) - { - type_info->stretch = CondensedStretch; - } - - else if (LocaleCompare(token,"Expanded") == 0) - { - type_info->stretch = ExpandedStretch; - } - - else if (LocaleCompare(token,"ExtraCondensed") == 0) - { - type_info->stretch = ExtraCondensedStretch; - } - - else if (LocaleCompare(token,"ExtraExpanded") == 0) - { - type_info->stretch = ExtraExpandedStretch; - } - - else if (LocaleCompare(token,"SemiCondensed") == 0) - { - type_info->stretch = SemiCondensedStretch; - } - - else if (LocaleCompare(token,"SemiExpanded") == 0) - { - type_info->stretch = SemiExpandedStretch; - } - - else if (LocaleCompare(token,"UltraCondensed") == 0) - { - type_info->stretch = UltraCondensedStretch; - } - - else if (LocaleCompare(token,"UltraExpanded") == 0) - { - type_info->stretch = UltraExpandedStretch; - } - - else - { - family_extent=q; - } - } - - (void) CopyMagickString(buffer,value_name,family_extent-value_name+1); - StripString(buffer); - type_info->family=ConstantString(buffer); - - list_entries++; - status=AddValueToSplayTree(type_list,ConstantString(type_info->name), - type_info); - if (status == MagickFalse) - (void) ThrowMagickException(exception,GetMagickModule(), - ResourceLimitError,"MemoryAllocationFailed","`%s'",type_info->name); - } - } - RegCloseKey ( reg_key ); - return(MagickTrue); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -% I m a g e T o H B i t m a p % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% ImageToHBITMAP() creates a Windows HBITMAP from an image. -% -% The format of the ImageToHBITMAP method is: -% -% HBITMAP ImageToHBITMAP(Image *image) -% -% A description of each parameter follows: -% -% o image: the image to convert. -% -*/ -MagickExport void *ImageToHBITMAP(Image *image) -{ - BITMAP - bitmap; - - ExceptionInfo - *exception; - - HANDLE - bitmap_bitsH; - - HBITMAP - bitmapH; - - register ssize_t - x; - - register const Quantum - *p; - - register RGBQUAD - *q; - - RGBQUAD - *bitmap_bits; - - size_t - length; - - ssize_t - y; - - (void) ResetMagickMemory(&bitmap,0,sizeof(bitmap)); - bitmap.bmType=0; - bitmap.bmWidth=(LONG) image->columns; - bitmap.bmHeight=(LONG) image->rows; - bitmap.bmWidthBytes=4*bitmap.bmWidth; - bitmap.bmPlanes=1; - bitmap.bmBitsPixel=32; - bitmap.bmBits=NULL; - length=bitmap.bmWidthBytes*bitmap.bmHeight; - bitmap_bitsH=(HANDLE) GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE,length); - if (bitmap_bitsH == NULL) - { - char - *message; - - message=GetExceptionMessage(errno); - (void) ThrowMagickException(&image->exception,GetMagickModule(), - ResourceLimitError,"MemoryAllocationFailed","`%s'",message); - message=DestroyString(message); - return(NULL); - } - bitmap_bits=(RGBQUAD *) GlobalLock((HGLOBAL) bitmap_bitsH); - q=bitmap_bits; - if (bitmap.bmBits == NULL) - bitmap.bmBits=bitmap_bits; - (void) TransformImageColorspace(image,RGBColorspace); - exception=(&image->exception); - for (y=0; y < (ssize_t) image->rows; y++) - { - p=GetVirtualPixels(image,0,y,image->columns,1,exception); - if (p == (const Quantum *) NULL) - break; - for (x=0; x < (ssize_t) image->columns; x++) - { - q->rgbRed=ScaleQuantumToChar(GetPixelRed(image,p)); - q->rgbGreen=ScaleQuantumToChar(GetPixelGreen(image,p)); - q->rgbBlue=ScaleQuantumToChar(GetPixelBlue(image,p)); - q->rgbReserved=0; - p+=GetPixelChannels(image); - q++; - } - } - bitmap.bmBits=bitmap_bits; - bitmapH=CreateBitmapIndirect(&bitmap); - if (bitmapH == NULL) - { - char - *message; - - message=GetExceptionMessage(errno); - (void) ThrowMagickException(&image->exception,GetMagickModule(), - ResourceLimitError,"MemoryAllocationFailed","`%s'",message); - message=DestroyString(message); - } - GlobalUnlock((HGLOBAL) bitmap_bitsH); - GlobalFree((HGLOBAL) bitmap_bitsH); - return((void *) bitmapH); -} - -#endif diff --git a/MagickCore/nt-feature.h b/MagickCore/nt-feature.h deleted file mode 100644 index 3a4426343..000000000 --- a/MagickCore/nt-feature.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization - dedicated to making software imaging solutions freely available. - - You may not use this file except in compliance with the License. - obtain a copy of the License at - - http://www.imagemagick.org/script/license.php - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - MagickCore Windows NT utility methods. -*/ -#ifndef _MAGICKCORE_NT_FEATURE_H -#define _MAGICKCORE_NT_FEATURE_H - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -#include "MagickCore/splay-tree.h" - -extern MagickExport void - *CropImageToHBITMAP(Image *,const RectangleInfo *,ExceptionInfo *), - *ImageToHBITMAP(Image *); - -#if !defined(XS_VERSION) - -extern MagickExport MagickBooleanType - NTIsMagickConflict(const char *), - NTLoadTypeLists(SplayTreeInfo *,ExceptionInfo *); - -#endif - -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif - -#endif diff --git a/MagickCore/version.h b/MagickCore/version.h index c215220e9..8f502c32a 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,14 +27,14 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC" -#define MagickSVNRevision "5486" +#define MagickSVNRevision "5542" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 #define MagickLibAddendum "-0" #define MagickLibInterface 7 #define MagickLibMinInterface 7 -#define MagickReleaseDate "2011-10-03" +#define MagickReleaseDate "2011-10-06" #define MagickChangeDate "20110801" #define MagickAuthoritativeURL "http://www.imagemagick.org" #if defined(MAGICKCORE_OPENMP_SUPPORT) diff --git a/Makefile.in b/Makefile.in index 20a8ea927..a85a4c0fb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -468,37 +468,37 @@ am__MagickCore_libMagickCore_la_SOURCES_DIST = \ MagickCore/widget.h MagickCore/widget-private.h \ MagickCore/xml-tree.c MagickCore/xml-tree.h \ MagickCore/xml-tree-private.h MagickCore/xwindow.c \ - MagickCore/xwindow.h MagickCore/nt-feature.c \ - MagickCore/nt-base.c coders/aai.c coders/art.c coders/avs.c \ - coders/bgr.c coders/bmp.c coders/braille.c coders/cals.c \ - coders/caption.c coders/cin.c coders/cip.c coders/clip.c \ - coders/cmyk.c coders/cut.c coders/dcm.c coders/dds.c \ - coders/debug.c coders/dib.c coders/dng.c coders/dot.c \ - coders/dpx.c coders/fax.c coders/fits.c coders/gif.c \ - coders/gradient.c coders/gray.c coders/hald.c coders/hdr.c \ - coders/histogram.c coders/hrz.c coders/html.c coders/icon.c \ - coders/info.c coders/inline.c coders/ipl.c coders/label.c \ - coders/mac.c coders/magick.c coders/map.c coders/mat.c \ - coders/matte.c coders/meta.c coders/miff.c coders/mono.c \ - coders/mpc.c coders/mpeg.c coders/mpr.c coders/msl.c \ - coders/mtv.c coders/mvg.c coders/null.c coders/otb.c \ - coders/palm.c coders/pattern.c coders/pcd.c coders/pcl.c \ - coders/pcx.c coders/pdb.c coders/pdf.c coders/pes.c \ - coders/pict.c coders/pix.c coders/plasma.c coders/pnm.c \ - coders/preview.c coders/ps.c coders/ps2.c coders/ps3.c \ - coders/psd.c coders/pwp.c coders/raw.c coders/rgb.c \ - coders/rla.c coders/rle.c coders/scr.c coders/sct.c \ - coders/sfw.c coders/sgi.c coders/stegano.c coders/sun.c \ - coders/svg.c coders/tga.c coders/thumbnail.c coders/tile.c \ - coders/tim.c coders/ttf.c coders/txt.c coders/uil.c \ - coders/url.c coders/uyvy.c coders/vicar.c coders/vid.c \ - coders/viff.c coders/wbmp.c coders/wpg.c coders/xbm.c \ - coders/xc.c coders/xcf.c coders/xpm.c coders/xps.c \ - coders/ycbcr.c coders/yuv.c coders/dps.c coders/djvu.c \ - coders/exr.c coders/fpx.c coders/clipboard.c coders/emf.c \ - coders/jbig.c coders/jpeg.c coders/jp2.c coders/png.c \ - coders/ept.c coders/tiff.c coders/webp.c coders/wmf.c \ - coders/x.c coders/xwd.c filters/analyze.c + MagickCore/xwindow.h MagickCore/nt-base.c \ + MagickCore/nt-base-private.h coders/aai.c coders/art.c \ + coders/avs.c coders/bgr.c coders/bmp.c coders/braille.c \ + coders/cals.c coders/caption.c coders/cin.c coders/cip.c \ + coders/clip.c coders/cmyk.c coders/cut.c coders/dcm.c \ + coders/dds.c coders/debug.c coders/dib.c coders/dng.c \ + coders/dot.c coders/dpx.c coders/fax.c coders/fits.c \ + coders/gif.c coders/gradient.c coders/gray.c coders/hald.c \ + coders/hdr.c coders/histogram.c coders/hrz.c coders/html.c \ + coders/icon.c coders/info.c coders/inline.c coders/ipl.c \ + coders/label.c coders/mac.c coders/magick.c coders/map.c \ + coders/mat.c coders/matte.c coders/meta.c coders/miff.c \ + coders/mono.c coders/mpc.c coders/mpeg.c coders/mpr.c \ + coders/msl.c coders/mtv.c coders/mvg.c coders/null.c \ + coders/otb.c coders/palm.c coders/pattern.c coders/pcd.c \ + coders/pcl.c coders/pcx.c coders/pdb.c coders/pdf.c \ + coders/pes.c coders/pict.c coders/pix.c coders/plasma.c \ + coders/pnm.c coders/preview.c coders/ps.c coders/ps2.c \ + coders/ps3.c coders/psd.c coders/pwp.c coders/raw.c \ + coders/rgb.c coders/rla.c coders/rle.c coders/scr.c \ + coders/sct.c coders/sfw.c coders/sgi.c coders/stegano.c \ + coders/sun.c coders/svg.c coders/tga.c coders/thumbnail.c \ + coders/tile.c coders/tim.c coders/ttf.c coders/txt.c \ + coders/uil.c coders/url.c coders/uyvy.c coders/vicar.c \ + coders/vid.c coders/viff.c coders/wbmp.c coders/wpg.c \ + coders/xbm.c coders/xc.c coders/xcf.c coders/xpm.c \ + coders/xps.c coders/ycbcr.c coders/yuv.c coders/dps.c \ + coders/djvu.c coders/exr.c coders/fpx.c coders/clipboard.c \ + coders/emf.c coders/jbig.c coders/jpeg.c coders/jp2.c \ + coders/png.c coders/ept.c coders/tiff.c coders/webp.c \ + coders/wmf.c coders/x.c coders/xwd.c filters/analyze.c am__objects_1 = MagickCore/MagickCore_libMagickCore_la-accelerate.lo \ MagickCore/MagickCore_libMagickCore_la-animate.lo \ MagickCore/MagickCore_libMagickCore_la-annotate.lo \ @@ -587,9 +587,7 @@ am__objects_1 = MagickCore/MagickCore_libMagickCore_la-accelerate.lo \ MagickCore/MagickCore_libMagickCore_la-widget.lo \ MagickCore/MagickCore_libMagickCore_la-xml-tree.lo \ MagickCore/MagickCore_libMagickCore_la-xwindow.lo -@CYGWIN_BUILD_TRUE@@WIN32_NATIVE_BUILD_FALSE@am__objects_2 = MagickCore/MagickCore_libMagickCore_la-nt-feature.lo -@WIN32_NATIVE_BUILD_TRUE@am__objects_2 = MagickCore/MagickCore_libMagickCore_la-nt-base.lo \ -@WIN32_NATIVE_BUILD_TRUE@ MagickCore/MagickCore_libMagickCore_la-nt-feature.lo +@WIN32_NATIVE_BUILD_TRUE@am__objects_2 = MagickCore/MagickCore_libMagickCore_la-nt-base.lo @DPS_DELEGATE_TRUE@am__objects_3 = \ @DPS_DELEGATE_TRUE@ coders/MagickCore_libMagickCore_la-dps.lo @DJVU_DELEGATE_TRUE@am__objects_4 = coders/MagickCore_libMagickCore_la-djvu.lo @@ -4077,16 +4075,10 @@ MAGICKCORE_BASE_SRCS = \ MagickCore/xwindow.c \ MagickCore/xwindow.h -@CYGWIN_BUILD_FALSE@@WIN32_NATIVE_BUILD_FALSE@MAGICKCORE_PLATFORM_SRCS = -@CYGWIN_BUILD_TRUE@@WIN32_NATIVE_BUILD_FALSE@MAGICKCORE_PLATFORM_SRCS = \ -@CYGWIN_BUILD_TRUE@@WIN32_NATIVE_BUILD_FALSE@ MagickCore/nt-feature.c \ -@CYGWIN_BUILD_TRUE@@WIN32_NATIVE_BUILD_FALSE@ MagickCore/nt-feature.h - @WIN32_NATIVE_BUILD_TRUE@MAGICKCORE_PLATFORM_SRCS = \ @WIN32_NATIVE_BUILD_TRUE@ MagickCore/nt-base.c \ @WIN32_NATIVE_BUILD_TRUE@ MagickCore/nt-base.h \ -@WIN32_NATIVE_BUILD_TRUE@ MagickCore/nt-feature.c \ -@WIN32_NATIVE_BUILD_TRUE@ MagickCore/nt-feature.h +@WIN32_NATIVE_BUILD_TRUE@ MagickCore/nt-base-private.h MAGICKCORE_INCLUDE_HDRS = \ MagickCore/MagickCore.h \ @@ -4146,6 +4138,7 @@ MAGICKCORE_INCLUDE_HDRS = \ MagickCore/monitor.h \ MagickCore/montage.h \ MagickCore/morphology.h \ + MagickCore/nt-base.h \ MagickCore/option.h \ MagickCore/paint.h \ MagickCore/pixel.h \ @@ -4214,8 +4207,7 @@ MAGICKCORE_NOINST_HDRS = \ MagickCore/module-private.h \ MagickCore/monitor-private.h \ MagickCore/morphology-private.h \ - MagickCore/nt-base.h \ - MagickCore/nt-feature.h \ + MagickCore/nt-base-private.h \ MagickCore/policy-private.h \ MagickCore/profile-private.h \ MagickCore/quantum-private.h \ @@ -4252,7 +4244,6 @@ MAGICKCORE_EXTRA_DIST = \ MagickCore/config.h_vms \ MagickCore/mac.c \ MagickCore/nt-base.c \ - MagickCore/nt-feature.c \ MagickCore/vms.c \ MagickCore/xwdfile.h_vms @@ -5350,9 +5341,6 @@ MagickCore/MagickCore_libMagickCore_la-xml-tree.lo: \ MagickCore/MagickCore_libMagickCore_la-xwindow.lo: \ MagickCore/$(am__dirstamp) \ MagickCore/$(DEPDIR)/$(am__dirstamp) -MagickCore/MagickCore_libMagickCore_la-nt-feature.lo: \ - MagickCore/$(am__dirstamp) \ - MagickCore/$(DEPDIR)/$(am__dirstamp) MagickCore/MagickCore_libMagickCore_la-nt-base.lo: \ MagickCore/$(am__dirstamp) \ MagickCore/$(DEPDIR)/$(am__dirstamp) @@ -6667,8 +6655,6 @@ mostlyclean-compile: -rm -f MagickCore/MagickCore_libMagickCore_la-morphology.lo -rm -f MagickCore/MagickCore_libMagickCore_la-nt-base.$(OBJEXT) -rm -f MagickCore/MagickCore_libMagickCore_la-nt-base.lo - -rm -f MagickCore/MagickCore_libMagickCore_la-nt-feature.$(OBJEXT) - -rm -f MagickCore/MagickCore_libMagickCore_la-nt-feature.lo -rm -f MagickCore/MagickCore_libMagickCore_la-option.$(OBJEXT) -rm -f MagickCore/MagickCore_libMagickCore_la-option.lo -rm -f MagickCore/MagickCore_libMagickCore_la-paint.$(OBJEXT) @@ -7399,7 +7385,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-montage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-morphology.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-nt-base.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-nt-feature.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-paint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-pixel.Plo@am__quote@ @@ -8457,14 +8442,6 @@ MagickCore/MagickCore_libMagickCore_la-xwindow.lo: MagickCore/xwindow.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MagickCore_libMagickCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MagickCore/MagickCore_libMagickCore_la-xwindow.lo `test -f 'MagickCore/xwindow.c' || echo '$(srcdir)/'`MagickCore/xwindow.c -MagickCore/MagickCore_libMagickCore_la-nt-feature.lo: MagickCore/nt-feature.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MagickCore_libMagickCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MagickCore/MagickCore_libMagickCore_la-nt-feature.lo -MD -MP -MF MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-nt-feature.Tpo -c -o MagickCore/MagickCore_libMagickCore_la-nt-feature.lo `test -f 'MagickCore/nt-feature.c' || echo '$(srcdir)/'`MagickCore/nt-feature.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-nt-feature.Tpo MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-nt-feature.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='MagickCore/nt-feature.c' object='MagickCore/MagickCore_libMagickCore_la-nt-feature.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MagickCore_libMagickCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o MagickCore/MagickCore_libMagickCore_la-nt-feature.lo `test -f 'MagickCore/nt-feature.c' || echo '$(srcdir)/'`MagickCore/nt-feature.c - MagickCore/MagickCore_libMagickCore_la-nt-base.lo: MagickCore/nt-base.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MagickCore_libMagickCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT MagickCore/MagickCore_libMagickCore_la-nt-base.lo -MD -MP -MF MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-nt-base.Tpo -c -o MagickCore/MagickCore_libMagickCore_la-nt-base.lo `test -f 'MagickCore/nt-base.c' || echo '$(srcdir)/'`MagickCore/nt-base.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-nt-base.Tpo MagickCore/$(DEPDIR)/MagickCore_libMagickCore_la-nt-base.Plo diff --git a/config/configure.xml b/config/configure.xml index abaa2f867..aa21b24dd 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -10,8 +10,8 @@ - - + + diff --git a/configure b/configure index 83e0db967..ae64eccd2 100755 --- a/configure +++ b/configure @@ -3584,7 +3584,7 @@ MAGICK_LIBRARY_CURRENT_MIN=`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE` MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE -MAGICK_SVN_REVISION=5486 +MAGICK_SVN_REVISION=5542 -- 2.40.0