Is it possible to write a PSD file from ColdFusion - coldfusion

I would like to be able to take a number of separate image files, mostly JPGs and PNGs, and programatically write them into a PSD file in ColdFusion. The idea is that I can create an online tool that I could use to create wedding albums from my digital wedding photos. Considering the intended use, it is imperative that image quality and color reproduction remain as close to the original as possible. My thoughts on this would be to import each file into a separate layer, and then set the positioning of the imported image by pixel coordinates.
I came across this, which appears to be the only mention of this sort of thing on SO (that I could find). However, I'd rather not revert to writing this all out in CFExecute. It seems needlessly complicated to add another language every future developer will need familiarity with, and CFExecute doesn't provide much in the way of monitoring or debugging if problems occur. But I'll do this if I need to.
Server is currently running ColdFusion 9 on Windows 2000 Advanced Server. We will probably be upgraded to ColdFusion 10 on Windows 2008 (or newer) by the time this goes to production, but having the ability to test it in my current environment would be a real plus.

Related

How to create a login application with Visual Basic (using WebHttpRequest)

Hei there, I'm not experienced at all in C++ as I need to start learning year the next year at my university, though, I've been creating a browser based game and I'm looking for someone to transform it into pc app.
Though, I'm wondering how to make that application send a http request via POST to a file on my webserver with the username / pw.
After all the tutotials I've been reading, I concluded that none worth spending my time with, because they all based on own database, and I'm looking for one that connects to a maestro server and requests the data from there.
This may not be the answer you are looking for, but you may consider two alternatives to a more pure C++ application.
If you already have a working browser game, try to take that same code and put the html/javascript/whatever in a file and give the file a ".hta" extention. It basically opens inside a browser to run your files, but it acts more like an application from the user's viewpoint. (And, as much as I hate Windows, they're pretty fun to create if I may say so). However, your source code with this option is easily read because it can be renamed to a text file (or html file).
You could use Visual C++ (or VB.net, which you have tagged to the question, as well as "Visual" C#) to create an application which mostly consists of a browser view. It could be a "standalone" application (however would rely completely on the .Net framework - may or may not be what you want) that basically accomplishes the same as the option above, but adds that you can "hide" your files inside your application.
Using the two above alternatives, you could make an application relatively quickly that would load your files, which I assume you have already created. Note that neither of the above alternatives will work on anything other than Windows OS's.
If the two above alternatives are not what you want, or if you have questions about either one, I'd be glad to attempt to help.
I've been able to find a friend that would do it in Delphi because I wouldn't want users to download net framework just for this ap.
So the program that would fit most for any apps is Delphi Prism XE (even if it's an addon of Visual Studio)

Standalone Desktop Application

I have been tasked with the creation of a desktop application within some very rigid constrains. The first version of the application was quite small, only intended for some specific tasks, but it seems like the application was quite liked, so I've been asked to improve it a lot.
The initial app I created was made as a hta with heavy doses of javascript and jquery, using a XML to store information (through MSXML2.3.0), but the increased amount of data makes me think it won't be able to keep up with the requirements, so I wanted to remake the application on a more solid base. Of course, I'd rather keep the interface more or less consistent with what I've already shown, and I'd prefer not having to rewrite all the code.
The restrictions are as follows:
-Desktop application. I cannot develop a web application, as not a single target computer has a solid internet connection.
-No need of installation (copying and pasting the folder should work, and should keep all the data consistent).
-Should be relatively multi plataform. The only information I have about the target machines is that all of them have a windows XP OS or newer, a MS Office 2003 suite or newer, and some kind of PDF reader.
-Should be able to embed and show different file types, such as diferent image formats, pdfs, and office documents. That said, for office documents, as long as I can link to the document and open it by instanciating a common MS Word/Excel/wathever app, it should be good enough, although interoperativity with the suite would be great.
I've been searching through the net, and I've found some interesting options, but I'm not sure about them.
On one side, I think XML won't be able to keep up, although I suppose I could make it work if I distribute the data through several xml files. I've been reading about open source embedded databases, such as SQLite, and it looks like this could work.
On the other side, I feel like the hta basis I'm using isn't going to work that well if the application keeps growing. I've checked lots of alternatives, but all of them give me some problems.
Cappuccino or Chromeless looks like good ideas, but both of them require a certain degree of HTML5, which is something I can't be sure the machine's browser will support enough. Also, NativeHost for Cappuccino seems to work only on Mac OSX. Xul looks interesting, but unusable.
Another option I've found is porting the app to Qt, but I don't know how hard would be porting the app to Qts, and it looks like I can only use the ActiveX needed for the embedding of MS Office applications with a proprietary license. Although that's comparatively less important, but I'm sure in the future I'll want to include those features.
That's how I stand. Do you think keeping the hta + XML architecture (or any variation thereof) could still work? Do any of the alternatives I've mentioned be viable? Do you know any other alternative?

Can an application pretend to be a file or folder?

I've been looking into centralising my computer game saves to make it easier to backup and restore as well as putting them up on the cloud via dropbox but there in so may places that it makes it quite difficult. I noticed the Windows 7 and Vista now support Symbolic links so I've been playing around with that but I was wonder the follow:
Is it possible (code example or a point in the right direction) for an application (vb.net or C++) to spoof a file or folder?
E.g. Application A (a game like Diablo III or Civilization V) attempts to read or right from file A (the game save), application B (the save repository) detects this read/write request and pipes the request through itself preforming the request on file B (the actual game save in another location). Application A is in no way altered and treats the file normally.
Note: I realise there are many simple ways of preforming the same task in essence such as monitoring the use of Application A or periodically checking file A and copying it if it has been altered since the last check etc but all these methods have draw backs and less interested in making it work than if it is possible.
It is entirely possible to do this through a file system filter driver. For information about these, take a look here:
http://msdn.microsoft.com/en-us/windows/hardware/gg462968
Filter drivers can hook into CreateFile operations and redirect the create to a different place if you want, but they are much harder to write as compared to normal applications. They run in kernel mode and must obey the limitations of drivers.
You can "fake" special folders, like control panel does, but I don't think you can create anything accessible/writeable (in an easy way). I might be wrong though. I had the same idea once too (as a compatibility step for some company stuff), but couldn't find anything supporting an easy way to do it. It seems like it might be easier to be done on Unix systems (but that's obviously no option here). Also, I wouldn't expect any nice or easy solutions for .net.
Only approach I could think about right now, would be highjacking the according API calls (e.g. FileOpen) to reroute/manipipulate them (similar to what root kits do), but I wouldn't say that's a good idea, considering it might be detected as possible malware or cheats by things like punkbuster or antivirus solutions.
Yes or no depending on (using your terms) the level of abstraction that Application A is using.
If Application A is performing a CreateFile wto start access and passing a fixed filesystem path then Application B would need to emulate a file system and do so in the kernel.
On the other hand if Application A were to user HTTP with RESTful URLs then the HTTP server could answer all requests from files or by dynamically creating the content.
So the question can only be answered in specific by knowing the details of Application A.

File preview component (C++/MFC)

Is anyone aware of a good, general purpose file preview component for MFC/C++ desktop applications?
Specifically, I'm looking for a component that I could embed in my application that would allow a broad range of file types (text files, multimedia, etc.) to be previewed without the need for original applications (such as MS Word, etc.) to be installed.
I could only find one, via Google:
http://www.file-viewer-sdk.com/
Unfortunately, these folks want $60k for unlimited redistribution, which is outside of our budget.
Anyone have any recommendations? If not a component, is anyone using another general-purpose strategy that works well for them?
You can write your own shell preview host once you know the interfaces.
You might want to check out Autovue, originally made by Cimmetry since acquired by Oracle
.
Our product makes limited use of their SDK to do some document conversions (Mostly RTF->PS) and that works well enough for us.

Map plugin for an MFC application

I want to display a map in a MFC application (Visual Studo 2008 with MFC Feature Pack).
Off the top of my head I have the following requirements:
I have to be able to add my own markers (plain lat/lon positions), preferrably with different colors/icons so one can distinguish between different types of markers.
If the map data is fetched from an online source, it has to be cache-able, i.e. I can pre-load maps for an area at a certain (or several) zoom-level(s) and then switch to "offline mode". Alternatively all map data is installed together with the application.
The standard operations like zoom in/out and pan should be possible for the user.
The user has to be able to select my markers, preferably by dragging a rectangle around them.
Since the whole app is written in C++/MFC I don't want to have to use the .NET runtime for this plugin.
It shouldn't cost a fortune.
I am currently using an ActiveX plugin called "ESRI MapObjects LT2" which can do all that in some way but it's very tedious to implement, the development seems to have stopped around the time when Visual Studio 6 was available and map material is either very basic or very expensive.
I thought about using Google Maps or Google Earth but I think they don't really support being used by non-web based applications.
I found ArcView to be some sort of successor of the plugin I use currently but I don't think I belong to the target audience since the functionality it offers is way more than what I need. Also I didn't find any information on pricing.
I have written an open-source Geocaching app ( it's in c++ ) that renders maps, the source is at:
http://code.google.com/p/gpsturbo/
It uses my own custom rendering but you could rip out the map parsing if you want. It renders map using google tiles ( and caches the tiles for offline use), as well as Garmin format GPS maps, there is also an Openstreetmap format renderer as well.
Reconsider google if you have internet access. You can make an instance of the IE browser appear in a frame within your application. I believe you can use an ActiveX control. Also Google Earth has a way to embed itself into a web page, and possibly an application as well.
Another option is Global Mapper which is not anywhere near as nice as Google Maps or Google Earth.
We used ESRI for a long time before abandoning it due to a lack of performance and lack of support. It was such a big pain to pay $10k for a license, and then be told they need $2k more so that we can actually use the thing. Oh, and then $2k more to add some extra functionality. Even when it didn't work, their support was dismal to lack-luster.
If you are not bound to Google Maps, you could choose OpenStreetMap.
There are couple of known applications for rendering OSM maps:
http://wiki.openstreetmap.org/wiki/Cobra
Kosmos
osmclient (on SourceForge)
First two render map directly, last one uses OpenStreetMap.org tiles.
You can cache as many tiles or data as you want, you are not restricted to do so.