Image library for vs2010 express - visual-studio-2010

I'm looking for image library working under vs2010. I tried imagemagick (and its api magick++) but that requires building it from scratch which is undesireable.
It doesn't have to be as advanced as imagemagick. I need it to open most popular image files and convert them to raw array of RGB888 or RGB565 data.

My solution was to switch to C# and use it's internal Image class. Works like a charm.

Step 1: Download Magick++
http://www.imagemagick.org/Magick++/
Under the heading, “Obtaining Magick++”, follow the “ftp” link then choose a download mirror for wherever you live. You should now see an ftp listing if you didn’t go to sourceforge or somewhere like that. Scroll down and click on the “binaries” directory and I downloaded “ImageMagick-6.8.6-9-Q16-x86-dll.exe” (6.8.6-9 was the current version at the time).
Step 2: Install Magick++
Run the .exe and next, next, next until you get to the screen below and make sure to select “install development headers for C and C++.” Also make sure to note the install path because we need that later.
Finish the installation and launch Visual Studio 2010.
Step 3: Adding Magick++ to a project
Open your project properties and at the top, set the Configuration to “All configurations” or Release(Active).
Magick++ doesn’t like to run in Visual Studio’s Debug mode so you have to build as a Release or ImageMagick won’t be happy.
In the project properties list on the left side, expand
Configuration Properties->General
Add the ImageMagick Include folder as an Additional Dependency. This is where you need to know where you installed ImageMagick too.
Next select “Code Generation” under the C/C++ section on the left sidebar of the project properties and ensure that “Runtime Library” is “Multi-Threaded (/MT)”
Expand the “Linker” section under C/C++ and add the lib directory for ImageMagick as an Additional Dependency (like in the image above, just “lib” instead of “include.”
Almost there.. now click on “Input” under the Linker section on the left sidebar. Add one more Additional Dependency and add these:
CORE_RL_magick_.lib CORE_RL_Magick++_.lib CORE_RL_wand_.lib
Step 4: Adding the header and namespace
namespace identifiers and you should be good to go!

Related

Qt - Resources are always lost in exe built with Visual Studio

I'm trying to build a demo application with Qt in Visual Studio 2019. I used the Qt VS Tools in the Visual Studio IDE, and the Qt Designer to create my user interface. I also used the Qt SVG module in order to use SVG images for my user interface.
I achieved a working project, which works pretty well in debug and release mode, as long as I run it from the Visual Studio IDE. Now I would like to distribute it as an independent .exe file. For that I tried to create a zipped archive containing the .exe itself, the required Qt DLLs, and of course the resources the interface requires.
The compiled .exe can be executed in its own dir without problems, however none of the images I added in the resources are visible. I tried several ways to resolve the issue, and read many tutorials explaining how to use and/or embed Qt resources in the exe file. None of them worked for me.
I already tried to:
Simply copy the images in the .exe dir, keeping their dir hierarchy or not, but only the .png and .jpg images were visible, all the SVG were lost.
Compile a Qt resource file (.rcc) using the Qt rcc.exe tool, and add it to the Visual Studio resources, not worked.
Generate a .pro file using the "Create basic .pro file..." menu item (which also generated a .pri file) and add the following line, without success:
RESOURCES += MyResName.qrc
Adding the below lines in various location of my source code (main form constructor, main() function, ...). Nothing worked:
QResource::registerResource("MyResName.rcc");
...
Q_INIT_RESOURCE(MyResName)
Playing around and mixing the above mentioned ideas, nothing worked.
So can someone give me an as simple as possible explanation about how to correctly build an .exe file with its required resources, which may work in an independent way, using Qt and Visual Studio 2019, in order to distribute it, respecting the following constraints:
The project is a C++ project developed with Qt and Visual Studio 2019.
The project uses Qt, has a .ui file built with Qt Designer, which embeds several SVG and/or PNG/JPG images, and in which these images are visible in design time and if the exe is run from the IDE.
The project uses a .qrc file pointing the images, SVG or not, required for the application.
The images were added to UI components through the styleSheet property, like that:
image: url(resources/images/im-dropbox.svg) center center;
Other resources files, like .pro, .pri, .rcc, ... may be generated without problems. The required resources are well embedded in the generated files (verified).
Please help me, because this situation gives me headache.
I'll try to cover all the issues i see, in the order i see them.
First you don't use the files from resources, the Qt resource file paths start with :/ for example to set an icon from resources (in C++ code) you will do it like:
a.setWindowIcon(QIcon(":/images/window_title_ico.png"));
Now, to use resources directly from Qt Designer, you'll need to add your .qrc file for each ui file (click on that "edit" icon and then "Open resource file") after that you can set the icons from resources, see the print screen (Qt designer started from VS)
Note: you can double check the generated .ui file (it's an xml file) to see if the icon paths start with :/ then you know you have done it right. //in the .ui file you'll see something like:
<pixmap resource="resources/resources.qrc">:/images/acceleration.svg</pixmap>
//notice the relative path to the .qrc file and the .svg file path starts with :/
And lastly to display .svg on deployment, i noticed that you need to deploy the Qt5Svg.dll too (the one from the: PATH_2_QT\5.XX.X\msvcXXX_XX\bin) deploying only imageformats\qsvg.dll is not enough.
Hope this help to clear things a bit!

How to build DNN 8 source files

I have just downloaded the source package for DNN 8. I created a folder for the site, copied the files there and found the solution named DNN_Platform.sln and opened it with VS 2015. Did a right click and build on the solution and it successfully completed. I navigated to the web site and it gave me the standard install screen to input info such as database name etc. It ran and I was able to go to the web site. It has a single blank page named home with nothing in the page. I can go to some of the admin pages and they are fine. But I got to File Manager and all that I see is the bread crumb telling me my page location. Same occurred trying to look at the Page management screen. When I look at the available modules there are only a few there and there is no module for either the file manager (Digital Assets) or page manager. It feels like I am missing a portion of the build. I Googled to find install instructions for DNN8 but so far can't find any. I found instructions for earlier source code installs but the DNN8 package is a lot different. Can someone tell me where I can find this information or shed some light on what I have done wrong? I also did a standard install for DNN8 and all the modules are there.
In the root of the source directory there are two solution files:
DNN_Core.sln
DNN_Platform.sln
Open both (two different Visual Studio instances). First build DNN_Platform.sln, then build DNN_Core.sln.
Once you've built both you will not see the module directories in Visual Studio unless you click on "Show all Files" in solution explorer. You will also find them using File Explorer.

Debugging Haxe with HaxeCpp and IntelliJ. DebugSocket not Found

I am currently trying to get the Haxe Debugger working with IntelliJ, using information from This video tutorial and This blog post.
At one point, the tutorial says that a DebugSocket object must be created in the "create" method of the main file. However, when I type this in, I get an unknown symbol error.
From what I understand, the DebugSocket object should be available from the hxcpp library (which I have included). However, the only options I am given if I type new hxcpp. are:
Builder
NekoInit
StaticMysql
StaticRegexp
StaticSqlite
StaticStd
StaticZlib
What am I doing wrong? Have I included the wrong library? Are these tutorials referencing an older version of the library? Is there anywhere I can find comprehensive documentation on how to use the hxcpp debug tools properly?
If this is easier with a flash build then I would consider this.
i haven't gotten hxcpp debugging to work (but i m sure it does). However, i find flash debugging to be easier. I assume you already have the project setup in idea (and isn't just using it as a simple text editor). This is the set of steps i took to get it to work:
Open the project structure (from the menu 'file', then 'project structure')
find the 'modules' section on the left, and select your module, then find the 'haxe' tab.
in the haxe tab, select compile with 'openfl', and target flash.
in the bottom part of the haxe tab, select a flex sdk.
if you don't have flex+air sdk installed, you can easily install it by going to http://www.adobe.com/devnet/flex/flex-sdk-download.html, and http://www.adobe.com/devnet/air/air-sdk-download.html. make sure you remember where you installed it. An alternative place you can find it is via flashdevelop's 'tools', 'install software' menu (which by default installs to your C:/Users/username/AppData/Local/FlashDevelop/Apps/flexairsdk/4.6.0+4.0.0/.
you can add the sdk to intellij by selecting 'SDKs' on the left, and click on the '+', and then select 'flex/air' sdk. You need the flex plugin installed (whcih should be by default).
once you got your debug SDK setup, you can create a run configuration, and debug like you normally do (click on the debug run menu item or toolbar button).
One complication is that on windows, you potentially have a deadlock with haxelib not starting your app, and intellij hanging to wait for it. See https://github.com/TiVo/intellij-haxe/issues/123 - i have outlined a solution in the issue comment if you find that you also have this problem.
use this website : http://raintomorrow.cc/post/48029438701/setup-idea-intellij-for-haxe-nme-development for some screenshots (it's an older version of intellij tho).

Why my custom fonts are being overwritten on iOS?

I'm trying to use custom fonts in my application. I followed the instructions and everything worked as expected.
The problem is that if I run the application again in Genexus, the custom fonts settings in the xcode's project are overwritten (Android still works).
I tried copy the project from Mac to models folder ("\mobile\iOS\"), but the problem persists.
Any solution?
As stated in the instructions:
As this is donde on the XCode project generated with GeneXus steps 3-5 have to be repeated after each execution from GeneXus.
However, there are a few things you can do to automate the process:
Add the fonts to your knowledge base as files, edit the properties for each of the files, set "Extract" to "Always", and in the "Extract to path" property add the relative path to the generated project's folder. Something like "..\mobile\iOS\main_object_name\iOS\Genexus"
Edit the template file located at "genexus_install_directory\iOS\Templates\iOS_Genexus\MainName-Info.plist", add the custom fonts key
You may also need to edit the project's template file located at "genexus_install_directory\iOS\Templates\iOS_Genexus\MainName.xcodeproj\project.pbxproj" (not sure about that), to add a reference to the fonts files
The best way to know what to add to the files from steps 2. and 3. is to generate the project in GeneXus, make a copy on the Mac before adding the fonts, add the fonts via Xcode as documented, and compare the resulting files with the originals.
A warning, though: the steps 2. and 3. apply to ALL applications generated with that GeneXus install, so you may want to make a copy or at least backup the modified files first.

Include Headers from added frameworks on Xcode

I want to work with some frameworks like glew and cg so i manually added
the needed frameworks to my project by right clicking the project -> Add files to ...
and choosing the correct framework. The problem is, when i try to include the header files,
Xcode cant find any of them. I hope this picture will help to understand:
And:
The error given is for the glew framework, but it also happens on Cg.
As you can see on the left, The needed frameworks were added.
Any idea on how i can include these headers?
After trying to add the header files manually i got an architecture error:
I dont know if this is how it should look like.
Thanks!
Before starting, remove the framework and all files you have added while trying to make it work.
Then, you have to add the frameworks in the Build Phases of your target. Then go into Link Binary With Libraries and select your framework from there.
This should do it. Your headers should be available as auto-completion after each #import directive.
If it does not work (it sometimes happens), there are additional steps I can provide to you.
Additional steps:
Go to your project settings, in the build settings:
Complete the Framework Search Paths with the path of your framework
Do the same with User Header Search Path
Then, it should work. If it does not, you will need to add the full path of your header in the #import directive. Example:
#import "/path/to/my/header.h"
Apple's documentation available here states:
In the project navigator, select
your project
Select your target
Select the 'Build Phases' tab
Open 'Link Binaries With Libraries'
expander
Click the '+' button
Select your framework
(optional) Drag and drop the added
framework to the 'Frameworks' group
In my case I have added Framework Search Paths for Target, but it should be added to Project
Also Always Search Users Path should be yes
For those whose autocomplete fails after adding framework.
I used to add frameworks, by going to Build Phases and taking the Link Binary with Libraries option. Now in XCode 6.1, though project was building fine, autocomplete in XCode was not working.
So what needs to be done is:
Remove the already added framework from Project Navigator and also from Link Binary with Libraries.
Add framework to project by simply File -> Add Files to option in XCode.
And auto complete will start working.
In my case, the external framework had been downloaded with Windows and added to the project. Then it was transferred to OSX, where the Xcode project was built and the external framework didn't load properly. I guess it is because Windows changes the framework folder to be a regular folder, which OSX then has trouble with.
Solution for me was to simply download the framework with OSX and drag it into the framework folder in the XCode project.
In my case I had to update a framework version, so I just replaced the .framework in the filesystem and then I got the error you've mentioned in the question.
Removing the framework and adding it back again, playing with the search paths and all the other suggestions didn't help.
Eventually, cleaning the build folder did the trick:
Select "Product" from the xcode menu, hold the option key and click on: "Clean Build Folder".
After that I built and ran the project successfully.

Resources