The Game Creators
The Game Creators Home Online Shop Click to Login
  Hot: Christmas CompetitionNovember NewsletterModel Pack 36DB Pro Pack 2009DGS BonanzaCharacter PackFPS Creator Bonanza;
The Game Creators
DBPro / Anyone fancy a REAL challenge? (Image Magick)

Go to the first page of this board Return to the Forum Menu Post Message
61 Messages - Page   of 2   
Bookmark and Share Search the Forum Next 40

Author Message
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 13th Jul 2007 12:02           | link | toggle

Imagemagick (http://www.imagemagick.org/script/index.php) is a set of open source image processessing functions, with massive potential. It can convert images from any format to any other (including svg vector graphics images that can be scaled indefinitely with no loss of quality), and it can do pretty much anything with an image that photoshop can do, including image manipulation, vector drawing and text rendering (with antialiasing) and batch processing. It has a wrapper for pretty much every language out there - except for DBPro. It looks to me like something that would be a huge improvement on the 2d image features currently in DBPro.

Hands up who would like a piece of that!

So, all we need is someone with the know how and the enthusiasm, to wrap it for dbpro. There is already a high level wrapper for C called Magickwand, and a wrapper for C++ called Magick++, either of which could easily (probably) be converted into a dll for DBPro by someone who knows how. I'd have a go at it myself, except for the fact that a) it's a bit over my head and b) it won't build with the two free compilers I have (Dev C++ or VS 2005 express) - apparantly it only works with the full version of Visual Studio or Borland (something about needing the Microsoft Foundation Class or somethigorother ...)

Anyone interested?

Back to top
Andromedus.com
Report this message as abusive
vorconan

User


Joined: Sat Nov 4th 2006
Location: Wales
Posted: 13th Jul 2007 13:37           | link | toggle

Sounds awesome, I'd love to see someone do it

Back to top
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 13th Jul 2007 17:45           | link | toggle

For the record, I tried to call it directly from DB Pro and failed miserably I can initiate it, but anything else just doesn't get recognised.

I agree with Ric, the potential is huge. For me, the ability to resize images using complex algorithms to maintain quality is what I want.

Back to top
The Biglaugh
Report this message as abusive
Zotoaster

User


Joined: Mon Dec 20th 2004
Location: Scotland
Posted: 13th Jul 2007 18:13           | link | toggle

I would have done it, but the whole needing the full version of Visual Studio draws me back a bit

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 13th Jul 2007 18:49           | link | toggle

I have that, but it's the size of the API that bothers me - there's just so much to wrap, it's unreal.

The fact that I have PSP8 with scripting built in also makes it seem less worthwhile. Even the free GIMP has scripting (if you don't like the scheme language, plug perl or python into it instead).

It's also unlikely that this library will run fast enough to provide real-time effects, though I guess it may be useful for utilities.

So, why is it needed, and how much of it?

Back to top
Matrix1 Software
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 14th Jul 2007 03:48           | link | toggle

It is a big api and wrapping the whole thing would take a considerable time investment. I also agree, that the speed of doing image processessing would make this more useful for an application than for real time effects in a game. But, then, DBPro is advertised as an application builder (It has "write incredible 3d games, applications and presentations" written on the box!) I also have a feeling, that applications written in dbpro have possibly had, and have the potential for more commercial success than games. With something like BlueGUI and an Imagemagick plugin, you could write all sorts of applications that involve or output 2d grahics.

Let's say someone wanted to write an application that creates, or allows the user to create textures or images - perhaps a small program to create buttons for website graphics. Just wrapping the readimage and writeimage methods alone would allow the program to load and save images into any image format (gif format would probably be useful for them).

Alos, as Batvink said, drawing and scaling images in the svg format would allow you to output images from your application of any size, with no loss of quality.

Well that's just me - lets see how much interest this thread gets - perhaps other people would have other uses?

If anyones interested, here's my thread on the imagemagick forum, where I have experimented a little, like Batvink, with the call dll command: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=9190&sid=6d3ee0f3517027716ae9ca4ee19398ef

Back to top
Andromedus.com
Report this message as abusive
vorconan

User


Joined: Sat Nov 4th 2006
Location: Wales
Posted: 14th Jul 2007 08:07           | link | toggle

Looks like you're getting somewhere at least


Back to top
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 14th Jul 2007 09:09           | link | toggle

The best use I can describe is user graphics. For example, allowing a user to add their own photo, avatar or logo to a game. Which is better...

Option 1: Please use a bmp, png or jpg file that is exactly 300 x 300 pixels

Option 2: Select any image. For best results,ensure it as at least 300 x 300 pixels

Back to top
The Biglaugh
Report this message as abusive
RUCCUS

User


Joined: Sat Dec 11th 2004
Location: Canada
Posted: 14th Jul 2007 10:46           | link | toggle

Ian you could always start on it and post your work. When you get tired of it, someone else might pick it up for a bit seeing as it's on it's way. After a few months of different people working on it, it'll be done. Theres tonnes of C++ Wizards on devhat, maybe they'd have a crack.


Back to top
My Name Is Adam.net
Report this message as abusive
Crit

User


Joined: Wed May 24th 2006
Location: Cyberspace
Posted: 14th Jul 2007 10:58           | link | toggle

Ric, maybe try initializing the call to magickreadimage with the path to the dlls.

result=call dll(1,"MagickReadImage",magick_wand,"[path to imagemagic dlls]");

Quote: "
Please note that under Windows (and possibly the Mac) it is necessary to initialize the ImageMagick library prior to using the Magick++ library. This initialization is performed by passing the path to the ImageMagick DLLs (assumed to be in the same directory as your program) to the InitializeMagick() function call. This is commonly performed by providing the path to your program (argv[0])
"

in c++, argv[0] is the path to your program
search for argv[0] here:
http://www.imagemagick.org/script/magick-wand.php

http://www.imagemagick.org/Magick++/
Back to top
Report this message as abusive
HowDo

3DMaster - Champion


Joined: Thu Nov 28th 2002
Location: United Kingdom
Posted: 14th Jul 2007 12:12     Edited: 14th Jul 2007 12:33     | link | toggle

I am No expert on this, but I know that jinzai as a lot knowledge on doing something like this, if you look at the One wire weather station project or jinzai how to find your IP address this may give you some clues on what you may need to do to get the plug in working.

One wire weather station project

and finding IP address code.
http://forum.thegamecreators.com/?m=forum_view&t=107388&b=1

hope this might show how to call some of the API and get someone going.

Dark Physics makes any hot drink go cold.
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 14th Jul 2007 13:12           | link | toggle

Quote: "Ian you could always start on it and post your work"
Ok, I'll take a look and see how best to wrap it.

I still need to know what people want to get out of it though. The only concrete requirement so far is 'load an image', and maybe 'resize an image' from Batvink, but that just scrapes the surface of what this library can do.

This is high-level from the web-site's front page:
* Format conversion: convert an image from one format to another (e.g. PNG to JPEG)
* Transform: resize, rotate, crop, flip or trim an image
* Transparency: render portions of an image invisible
* Draw: add shapes or text to an image
* Decorate: add a border or frame to an image
* Special effects: blur, sharpen, threshold, or tint an image
* Image calculator: apply a mathematical expression to an image or image channels
* Text & comments: insert descriptive or artistic text in an image
* Image identification: describe the format and attributes of an image
* Animation: create a GIF animation sequence from a group of images
* Composite: overlap one image over another
* Montage: juxtapose image thumbnails on an image canvas
* High dynamic-range imaging: accurately represent the wide range of intensity levels found in real scenes ranging from the brightest direct sunlight to the deepest darkest shadows
* Large image support: read, process, or write mega- and giga-pixel image sizes
* Threads of execution support: ImageMagick is thread safe and many internal algorithms are already threaded to take advantage of speed-ups offered by the dual and quad-core processor technologies.

If it's just 'load an image', that's dead easy. If more is required then that may affect how the functionality is wrapped up.

Back to top
Matrix1 Software
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 14th Jul 2007 14:35           | link | toggle

* Format conversion: convert an image from one format to another (e.g. PNG to JPEG)
Good for unsupported formats
* Transform: resize, rotate, crop, flip or trim an image
rotate, crop, flip and trim can be done in DBP. But Resize in DBP gives poor results.
* Transparency: render portions of an image invisible
Already available through colorkey and alpha
* Draw: add shapes or text to an image
Available to a degree. Cloggy's D3D does nice antialiased text, and we can add basic shapes
* Decorate: add a border or frame to an image
Not rocket science to do in DBP
* Special effects: blur, sharpen, threshold, or tint an image
Would be nice
* Image calculator: apply a mathematical expression to an image or image channels
Must have a thousand uses, if it's generic
* Text & comments: insert descriptive or artistic text in an image
Not sure what uses this would have
* Image identification: describe the format and attributes of an image
Is this necessary?
* Animation: create a GIF animation sequence from a group of images
We have animated sprites already
* Composite: overlap one image over another
Nice
* Montage: juxtapose image thumbnails on an image canvas
Not really necessary
* High dynamic-range imaging: accurately represent the wide range of intensity levels found in real scenes ranging from the brightest direct sunlight to the deepest darkest shadows
For Skyboxes?
* Large image support: read, process, or write mega- and giga-pixel image sizes
Could be useful

Back to top
The Biglaugh
Report this message as abusive
vorconan

User


Joined: Sat Nov 4th 2006
Location: Wales
Posted: 14th Jul 2007 16:24           | link | toggle

Quote: "* Image calculator: apply a mathematical expression to an image or image channels"

Thats sounds awesome


Back to top
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 15th Jul 2007 10:14           | link | toggle

These are the aspects that I think would provide the most benefit for a general range of uses. Where I have made reference to actual functions, I'm referering to the Magickwand api for C, found here: http://www.imagemagick.org/script/magick-wand.php

Format conversion (MagickReadImage/MagickWriteImage)

Resizing/scaling - (MagickScaleImage/MagickResizeImage). You can choose the specific resizing algorithm you want, and resizing bitmap images gives better results than dbp, but more importantly, the resize features enable you to resize vector images, which is impossible in dbp.

Cropping, flipping and rotating - these kinds of things are possible in DBPro using sprites, but you then have to use the get image command to output it as an image or manipulate it further. Using 'get image' reduces quality, (I think it applies filtering, which alters the raw data of the image). Using memblocks can get tricky - so these functions would be a useful bonus.

Vector and text drawing. Things like DrawLine, DrawEllipse, DrawBezier, DrawRectangle, DrawAnnotation. Cloggy's d3d plugin is good for some of these, but has some issues in my experience - it works for me, but I had to remove it entirely from GUI Studio because it caused errors for other users. The options for drawing and text in Imagemagick are very versatile, too, with control over stroke width, fill colour, gradient fills etc. I'd especially like the text features, which would also mean wrapping the font and allignment methods.

Image effects: MagickGaussianBlurImage would be very useful - much more control than dbpro's blur bitmap command. MagickShadowImage (applies a drop shadow), MagickShadeImage (applies a distant light source to the image) and MagickRaiseImage (applies a sort of bevel) would be very nice features too.

Image Layering: Using the two functions MagickCompositeImage and MagickSetImageOpacity enable layering of one image over another - and there are a number of useful ways images can be added, like multiply, screen, difference etc. Could be done with memblocks, but very tricky.

There would also need to be a number of functions included for general functionality - things like changing stroke colour, creating/destroying/rendering 'wands' (from what I understand, wands are like separate images which can be named, and combined together - there are three varieties - magick wands, for image effects, drawing wands for vector drawing, and pixel wands for things like changing ink colour.) Also, for the Magickwand api at least, you need the functions 'MagickWandGenesis' and 'MagickWandTerminus' to inialise and terminate the process.

I think Ruccus has a good point - if someone like Ian would be willing to at least start this off, then I think that's probably the most difficult part. Once the framework is in place, anyone with a suitable compiler should be able to add functions reasonably easily, if the project is left open.

Back to top
Andromedus.com
Report this message as abusive
jinzai

User


Joined: Sat Aug 19th 2006
Location: USA
Posted: 15th Jul 2007 13:35           | link | toggle

Ric, to be honest I have avoided your thread because I was all about getting GUIStudio, but my income has prevented that. Besides, I have yet to create the experiments to finish my DSP project. I did find this guy that built a sonar much like the one I'm building, but alas, I lost the link!

Now, the other reason is that I, ahem am owing someone some updated code from last week. Unfortunately, I recently developed a personal life which is keeping me away from more purely intellectual pursuits.

Of course I'd like to see that wrapped for use with DBPro. The process, while lengthy and a little tedious, is not onerous by any stretch. As HowDo pointed out, I have done alot of that type of work. I use VisualC++ 2003, which is a pretty complete system for working with DBPro.

I will get up to speed and open an interface to the dll the same way I always do. That will at least produce a set of source files. I want to point out that Microsoft Foundation Class is still available to those using third party compilers. You only lack the include files, and they are included along with the documentation on how to use them in the Platform SDK. (You know, I am going to start asking Bill for money when I put that pitch in for him.)
Back to top
Report this message as abusive
jinzai

User


Joined: Sat Aug 19th 2006
Location: USA
Posted: 16th Jul 2007 07:28     Edited: 16th Jul 2007 07:31     | link | toggle

Okay, that was alot of downloading and circular webpage navigation to find out that I could just use Standard Operating Procedures. After all of that, and some digging, I got told to copy the demo project files...

The function call that is required is called InitializeMagick. All it does is tell the core where the dlls are at. (AAAARRRRGGGHHHH! For over 15 years this has worked exactly the same way!) DLLs that are not plug-ins should be put in the application's directory (actually the worst choice, imo), Windows directory (outstanding choice), or Windows system directory (really only for drivers, and Windows components, but alot of low-level dlls are in there from alot of companies.)

I put all of the DLLs into c:/windows, and I naturally wrote as the first function in the plug-in:
int InitImageMagick(const char* lppath)

It is called from DBPro like this:
temp = InitImageMagick("c:/windows")

Now, this function calls the constructor of my class that will contain collections of each of the classes that ImageMagick exposes. They will be numbered on the DBPro side, just like other DBPro entities (e.g. objects, images, sounds, etc.)

+ Code Snippet
JZIMAGEMAGICK_API int InitImageMagick(const char *lppath)
{
	if (pjzImageMagick != NULL) delete pjzImageMagick;
	pjzImageMagick = new jzImageMagick(lppath);
	return pjzImageMagick != NULL ? TRUE : FALSE;
}

jzImageMagick::jzImageMagick(const char* lpdllpath)
{
	InitializeMagick(lpdllpath);
	return; 
}


The DLL contains one global pointer to the jzImageMagick wrapper class, and will expose access to it through DBPro-callable functions. At some point, I will write [again!] code to search for the DLLs. I'd rather say forget it, if they are not in the three directories that any brain-dead application gets searched for free, they are probably not there, but...Mom said to be nice. For now, I am going to handle it on the DBPro side by passing the correct answer in that string, since it works.

I can provide a framework that should be able to be used with most any compiler. The settings are not especially tricky. Paths to the include files, and libraries, along with library dependencies are the only new things. A standard plug-in stub suffices for starters.

The only real tricky part of this type of thing is setting up templates for using the C++ Standard Template Library, and that has already been done in the case of Magick++.

Should have some functionality by mid-week.
Back to top
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 16th Jul 2007 09:53           | link | toggle

Wahey! Great to have you on board Jinzai.

I wish I was clever enough to understand everything you just said, but for now I'll have to wait with anticipation to see what you can come up with! If the plugin needs a place to be hosted, let me know.

Btw, I have emailed you regarding other stuff.

Back to top
Andromedus.com
Report this message as abusive
Zerk

User


Joined: Sat May 13th 2006
Location: Orbiting Jupiter
Posted: 16th Jul 2007 09:58           | link | toggle

Sounds like Ric wants some work done for free?

zParticle BETA finally released! An advanced particle system plugin for DBP!
More information and Download link!
Back to top
Zerks DarkBASIC Page
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 16th Jul 2007 10:11           | link | toggle

Quote: "Sounds like Ric wants some work done for free? "

Nah, the Kudos attached to getting this working is payment in full. This would be a fantastic addition.

Back to top
The Biglaugh
Report this message as abusive
Google Ad
Back to top
 
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 16th Jul 2007 10:47           | link | toggle

Quote: "Sounds like Ric wants some work done for free? "

I'm not after anything for free - if someone wants to make this into a plugin and charge for their time, that's entirely up to them. However, as Imagemagick is open source, they may well think that the aim of this kind of project is more about benefiting the community. As BV said, there are rewards in life other than money - kudos, appreciation, respect ......

Back to top
Andromedus.com
Report this message as abusive
Ron Erickson

Moderator


Joined: Fri Dec 6th 2002
Location: Pittsburgh, PA, USA
Posted: 16th Jul 2007 11:51           | link | toggle

If I wasn't up to my ears in projects already, I'd love to take this one on. Good luck to whoever decides to run with it.

-Ron

Back to top
GameToolshed
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 16th Jul 2007 15:35           | link | toggle

@jinzai,

If you are taking this on, great - I can be doing other things.

Have you tried looking into compiling the library as a static library instead of a DLL? That way you'll avoid any DLL conflicts (now or in the future - there are products that already use the library), or people forgetting to include the DLLs with any distribution of their code.

Back to top
Matrix1 Software
Report this message as abusive
Vidiot

User


Joined: Mon May 15th 2006
Location: NJ
Posted: 19th Jul 2007 12:50           | link | toggle

I wish I could offer to help. But this is way over my head. All I can say is I really could use a high quality image resize function that can operate from within DBPro. Thats the one thing about my Digital Signage app that I'm not satisfied with. I tried different methods in DBPro and they produced very different results depending on the original image. Some would look perfect after a resize and others would look lousey regardless of the original's size.

Personally, I'm more of a graphics guy than a programmer so I'd likely be interested in ANY new graphic functions. If you want someone to help with testing this as it develops, I'd be glad to. I have Corel Draw and Photoshop so I can access ALOT of different image types.

The answer to Life, the Universe, and Everything? "Tea for Two". Deep Thought was Dyslexic.
Back to top
Report this message as abusive
Xolatron

User


Joined: Sun Mar 12th 2006
Location: The Star Forge Language: DBpro
Posted: 22nd Jul 2007 15:15     Edited: 22nd Jul 2007 15:28     | link | toggle

This looks really nice, and I'd be glad to see a DBp wrapper. Image conversion would be nice (since DBp doesn't support GIF images or interlaced jpegs)

As to the dlls, I find it's easiest to have the exe extract them on runtime and then call them, so only the exe file has to be distributed. I usually have one dirblock file and extract it to a "temp" folder in my app's directory.

As far as images go, though: In the meantime, I use binkconv.exe (Search for "Bink" on Google, download, install, and copy binkconv.exe & radutil.dll to your program's directory) to convert images - it could also resize them with high-quality. Here's the function source code (it requires binkconv.exe and ratutil.dll in the program's directory):

+ Code Snippet
Rem Using Bink to convert images (could be restyled to resize images)
Rem By Xolatron

global dbpAppDir as string
dbpAppDir = get dir$()


#constant kernel32num 2
#constant shell32num 4
load dll "Kernel32.dll",kernel32num
load dll "Shell32.dll",shell32num

lerr = binkConvert(get dir$(),"temp.gif","temp.bmp")
print "converted file exists = "+str$(file exist("temp.bmp"))
print "error return = "+str$(lerr)

suspend for key

end


function binkConvert(dirstr as string,inputfile as string,outputfile as string)
  local lerr
  local lcurdir as string
  rem remember the working directory
  lcurdir = get dir$()
  rem but use the specified dir instead
  set dir dirstr
  if file exist(inputfile)=0
    lerr = -1
  else
    delete file outputfile
    rem this calls binkconv.exe (which needs radutil.dll) silently
    lerr = call dll(shell32num,"ShellExecuteA",0,"open",dbpAppDir+"binkconv.exe",inputfile+" "+outputfile+"  /b16 /c2 /n-1 /#",dirstr,0)
    rem ShellExecuteA will return<=32 if there's an error
    if lerr>32
      lerr = 0
      rem now wait a while to check if the new file was created
      for lp = 1 to 10000
        sleepCPU(1)
        if file exist(outputfile) then exitfunction lerr
      next lp
      lerr = 1
    else
      lerr = 1
    endif
  endif
  rem restore current directory
  set dir lcurdir
endfunction lerr


function sleepCPU(millisecs as dword)
local temp as dword
temp = call dll(kernel32num,"Sleep",millisecs)
endfunction


Bink is free to download and distribute, but your program should display the bink logo somewhere. For more information, see the Bink website.

I've tried all the image conversion tools I could find, and however odd it is to call an exe file, it seems to work the best so far.

It'd be nice to have the full range of files in ImageMagick supported and in dlls (rather than akward exes), though.

-Xol

Back to top
ComicSync Beta Thread
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 22nd Jul 2007 19:21           | link | toggle

Good info, Xol. Certainly looks useful until an Imagemagick wrapper materialises. Does it do the conversion without opening any horrible dos prompt windows? Imagemagick can be run by command line too, but I couldn't find a way to hide the dos window.

Back to top
Andromedus.com
Report this message as abusive
Xolatron

User


Joined: Sun Mar 12th 2006
Location: The Star Forge Language: DBpro
Posted: 23rd Jul 2007 14:49           | link | toggle

I've never gotten a DOS window using DBpro's "execute file" command, but that code uses a ShellExecuteA call to shell32.dll and tells it to suppress any pop-up windows, so it should be fine.

Perhaps replacing 'execute file' with this would help:
+ Code Snippet
#constant kernel32num 2
#constant shell32num 4
load dll "Kernel32.dll",kernel32num
load dll "Shell32.dll",shell32num

lerr = call dll(shell32num,"ShellExecuteA",0,"open",exename$,parameters$,startIn_Directory$,0)


The 0 parameter at the end of the call tells shell32 to make the call invisible. The mouse sometimes turns into a half-timer (both pointer and timer - I don't know how else to describe it), though.

I'm interested to know why a DOS window appears when you normally call ImageMagick from the command line, since 'execute file' works without any console window for me - the exe specified simply runs as usual. Does this problem happen if you try to execute notepad.exe from DBpro, for example?

I resorted to the shell32 call above because the Bink Converter usually brings up a progress window (but for images this is so fast it's useless). The "/#" parameter allows this console to disappear without user input, so it doesn't invisibly slow down the CPU either.

-Xol

Back to top
ComicSync Beta Thread
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 23rd Jul 2007 16:05           | link | toggle

Quote: "I'm interested to know why a DOS window appears when you normally call ImageMagick from the command line, since 'execute file' works without any console window for me - the exe specified simply runs as usual. Does this problem happen if you try to execute notepad.exe from DBpro, for example?"

No - it seems to be specific to Imagemagick - I don't know why, I think it's just designed that way. I'll try your alternative using shell execute - that may work out better. Still no substitute for a proper dbpro interface, though.

Back to top
Andromedus.com
Report this message as abusive
jinzai

User


Joined: Sat Aug 19th 2006
Location: USA
Posted: 26th Jul 2007 20:29     Edited: 26th Jul 2007 20:30     | link | toggle

IanM - well, I am working with it. I think that is a great idea...I much prefer static linking for this type of thing. I D/L'ed all the source, as well. that was alot of downloading! Certainly, any other thoughts that occur to you would be most welcome. Right now, I am using a thin wrapper class that uses STL vectors. It works well so far. I hope that I can post something soon. We can discuss why its crap then, and fix it!

...and I am on a somewhat coerced holiday in St. Louis right now. I brought the machine, but...haven't gotten 'tound to setting it up here...perhaps tomorrow - still sightseeing...St. Louis is a great midwestern city!
Back to top
Report this message as abusive
jinzai

User


Joined: Sat Aug 19th 2006
Location: USA
Posted: 2nd Aug 2007 04:07           | link | toggle

Okay, I have the 21 projects running along in lockstep. The ImageMagick Windows source is unevenly documented, but fortunately it is so over-complete that I was able to wrestle it into my way of doing things; so far, so good. A few notes to anyone else wanting to work this way...you have to do a couple of things to create proper libraries for use in the DBPro DLL project. First of all, in the ImageMagick configure project, you must edit magick-config.h.in and #undef ProvideDllMain. The project you want to configure is VisualStaticMTDLL. In addition to that, you will want to manually edit every library project and specifically ignore the libraries msvcprt.lib and libcmt.lib. (You can right click in the Solution Explorer window and select the menu item Properties. You set the option on the Librarian tab, under the item Ignore Specific Library.) Now, after that, I move the built libraries up into a folder I created called lib, in the folder ImageMagick-6.3.5 I set my library search path to that in VisualC++, and list the libraries as additional dependencies, and copied the directory structure and include files to my plug-in project directory. Clear as mud, but it works alright for me. There is some include file editing necessary get it all working properly, but this way I can just create one DLL that includes all 19 ImageMagick DLLs as static code and has but one interface to DBPro. That is the idea, anyway. I only have the CoderInfo class working right now because I took my sweet time about getting the toolchain set up on this one. Too many side issues! I had to fix .NET, and that was a chore, but my system is much more stable now. Oh, and yes, I'm still on vacation, as well.

Perhaps I will post up something more specific, if anyone is interested in seeing my project files...they are VisualC++.NET 2003 based, but...I think they would work in VisualC++.NET 2005, as well. The ImageMagick source is in the file ImageMagick-windows.zip. After you unzip it, you go to the VisualMagick/configure directory, and open the configure project. VS will want to convert the projects, which is okay. This program, once built will make the project files for building the ImageMagick libraries. You configure the project, then open it and clean/make all. There is documentation on this process, but it has the usual Unix/Linux bias, so there are some things that are necessary, but not documented, like I stated above. I am not at all certain that I have found every issue as yet, either.
Back to top
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 2nd Aug 2007 07:26           | link | toggle

Wow, sounds like a lot of work. Hope you're still enjoying your vacation! Once completed, then, will this just be one dll which goes into the plugin directory? Or will there be a requirement to install additional libraries onto the end users machine, in order to distribute a dbpro exe that uses the plugin?

Let me know if I can help out in anyway (eg. documentation?)

Back to top
Andromedus.com
Report this message as abusive
MikeS

Moderator


Joined: Mon Dec 2nd 2002
Location: United States
Posted: 2nd Aug 2007 16:25           | link | toggle

Just wanted to drop by and offer my few word of encouragement. This certainly looks like an excellent and very useful project. Keep up the great work!



A book? I hate book. Book is stupid.
(Formerly Yellow)
Back to top
Report this message as abusive
jinzai

User


Joined: Sat Aug 19th 2006
Location: USA
Posted: 2nd Aug 2007 17:54     Edited: 2nd Aug 2007 18:06     | link | toggle

Yes, it will be a single DLL with no external dependencies. At first, I thought it might be necessary to distribute X11 DLLs, but they are included in the library source. Then, I was not sure which static library to build/use. In determining the proper build, I came across the other issues I mentioned above.

It isn't much work at this point - I am just having the same slow time remembering how we do this sort of thing - combine third party library code with my code to present to the first (or is it second) party? In a DLL, noless. Today, I provided the basic constructors for images and blobs, and discovered that TGA is multiframe, and AVI is not writable from ImageMagick. Not surprising, either one.

btw, my answer to the why use a DOS window question is that all of the prebuilt utilities are console projects. My opinion is that this is the same leaning towards Unix/Linux that Open Source multi-platform projects seem to do. There are some other projects included in the Windows source that are not console projects...they are Windows apps. C++ sample and teaching code usually uses this programming method (a DOS, or console window) because it seems simple to the person writing it. True, but...I never liked it, either.

...and yes, the vacation is going well still.
Back to top
Report this message as abusive
Vidiot

User


Joined: Mon May 15th 2006
Location: NJ
Posted: 4th Sep 2007 20:02           | link | toggle

Not to pester, but... Is there anything to test yet?

Or did you all move to a new thread?

The answer to Life, the Universe, and Everything? "Tea for Two". Deep Thought was Dyslexic.
Back to top
Report this message as abusive
jinzai

User


Joined: Sat Aug 19th 2006
Location: USA
Posted: 29th Sep 2007 16:10           | link | toggle

My bad guys. Yes, there is a pretty complete DLL which I will try to get posted today, or Monday at the latest. Alot is done, and I have documentation, too.

Sorry about the delay, I got moved out of my place and still don't heve my belongings back. Might have to get Judge Joe Brown on this one!
Back to top
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 30th Sep 2007 07:18           | link | toggle

Look forward to seeing what you've done Jinzai. No need for apologies - you're doing the work for this voluntarily, so it takes however long it takes. Hope you get your possessions back as soon as possible - sounds pretty awful!

Back to top
Andromedus.com
Report this message as abusive
Vidiot

User


Joined: Mon May 15th 2006
Location: NJ
Posted: 26th Oct 2007 09:18           | link | toggle

Knock, knock... (creeeeeeeeeeek)

Hello? Is anyone in there?

There's dust on all these posts. And WW Webs on all the routers... I'm scared!

LOL. Sorry for the bad humor but I do actually have a question if this DLL is ever completed. Did someone mension this .dll was already "open source"? And does that affect my ability to use a function from it in a application that I intend to sell?

@Jinzai, I wish there was a way I could help!

The answer to Life, the Universe, and Everything? "Tea for Two". Deep Thought was Dyslexic.
Back to top
Report this message as abusive
jason p sage

User


Joined: Sun Jun 10th 2007
Location: Ellington, CT USA
Posted: 26th Oct 2007 14:50           | link | toggle

I THINK you can sell stuff that uses it - but in many of the licesne I know of for opensource - you must make the changes to the code that you did available. Not the code to your game - but the changes to the lib to make it work for ya. They're all different though - but that's usually how it goes.

Back to top
Jason P Sage
Report this message as abusive
jinzai

User


Joined: Sat Aug 19th 2006
Location: USA
Posted: 14th Nov 2007 15:34     Edited: 14th Nov 2007 15:39     | link | toggle

...okay, here it is FINALLY. Sorry again.

There is no alpha yet, and the Drawable class is not totally there, but you can do some neat stuff with it.

The file is a zip of the directory structure with the Dark BASIC Pro directory being the root. There is a sample project (yes, it totally stinks, but....) and also help and keywords. Thanks to Ric and Benjamin for the examples to follow.

Cheers, I hope its useful. Also, I hope to get back online soon. Right now, I am staying with #3 and #1 sons. Its been great, but no Internet.
Back to top
Download: jzimagemagick.zip Size: 1838118 bytesReport this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 14th Nov 2007 19:36           | link | toggle

Fantastic!! I will check it out as soon as I get back to my dev machine tomorrow - I can't wait to try it.

Back to top
Andromedus.com
Report this message as abusive

Go to the first page of this board Return to the Forum Menu Post Message
61 Messages - Page   of 2   
Search the Forum Next 40

This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.

Forum Search

Enter a word or phrase to search our Forum for:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Dark Game Studio
Privacy Policy AUP Top of Page