nt-bast.c problems

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
rk6125

nt-bast.c problems

Post by rk6125 »

i am trying to compile a single threaded static version and i get 11 errors in nt-base.c

i am on XP using Visual C++ 6.0 EE

here is the build output

C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(510) : error C2065: 'HCRYPTPROV' : undeclared identifier
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(510) : error C2146: syntax error : missing ';' before identifier 'handle'
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(510) : error C2065: 'handle' : undeclared identifier
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(513) : error C2143: syntax error : missing ';' before 'type'
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(515) : error C2064: term does not evaluate to a function
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(516) : error C2065: 'status' : undeclared identifier
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(516) : error C2065: 'MS_DEF_PROV' : undeclared identifier
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(516) : error C2065: 'PROV_RSA_FULL' : undeclared identifier
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(517) : error C2065: 'CRYPT_VERIFYCONTEXT' : undeclared identifier
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(517) : error C2065: 'CRYPT_MACHINE_KEYSET' : undeclared identifier
C:\Documents and Settings\KaltreR\Desktop\ImageMagick-6.3.8\magick\nt-base.c(520) : error C2065: 'CRYPT_NEWKEYSET' : undeclared identifier

Please help
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: nt-bast.c problems

Post by magick »

HCRYPTPROV should be defined in the system header, NTSecAPI.h. Make sure the crypto API is downloaded from Microsoft or comment out the internals of the NTGatherRandomData() method in magick/nt-base.c. We use the crypto API to produce true-random numbers but ImageMagick is fine without it unless you intend on using the -encipher option.
rk6125

Re: nt-bast.c problems

Post by rk6125 »

how do i install the crypto api. i want to make sure i can use all the functions of imagemagick. Thanks for your quick responce by the way!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: nt-bast.c problems

Post by magick »

Not sure, we're Linux developers. All we know is that it was available on our system when we built ImageMagick and that it seems to be a commonly used Microsoft API.
rk6125

Re: nt-bast.c problems

Post by rk6125 »

well everything compiled when i commented out the functions inerds. I was expecting the single threaded version to only allow 1 instance of ...say convert.exe to run at a time. when i check current processes....if i call convert.exe 2 times i see 2 instances in my processes. is there a way i can get this to occur?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: nt-bast.c problems

Post by magick »

If you only want one instance of convert running at a time you need to synchronize that yourself, perhaps with a lock file. We, for example, check the system load average and if it exceeds a threshold we block until the load average returns to normal.
rk6125

Re: nt-bast.c problems

Post by rk6125 »

well we are currently using this tool in are document management system. Recently the convert.exe has been taxing our quad core processors. At the time of full load, there were 5 instances of convert.exe running. the spikes last 15-30 seconds...which is huge in web app terms. we are calling convert from the shell and passing arguments

-quiet -resize 960x1280! file1.ext -quality 50 +profile * file2.ext

I just compiled to single threaded which should help a little, but is there any way to further increase efficency by decreasing cpu load. Our web servers are coldfusion mx 7. Would one of the api's increase efficency? Thanks for being so helpful!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: nt-bast.c problems

Post by magick »

Interfacing with an API in most cases is significantly more efficient that running from a shell. Somewhere out there is a Cold Fusion interface to ImageMagick or use the ImageMagickObject.
Post Reply