17. November 2013

How to build sample applications from Adobe Illustrator SDK CC by Microsoft Visual Studio 2013 Express

Let’s try to build sample applications from Adobe Illustrator SDK CC with Express version of Visual Studio.

Adobe Illustrator SDK is available at: http://www.adobe.com/devnet/illustrator/sdk.html

In readme file Adobe explicitly states requirement that you should use Microsoft Visual C++ 10 (Visual Studio 2010 SP1). Hm.

Unzip directory with SDK and go to samples directory. Let’s start with LiveDropShadow sample.

Double click LiveDropShadow.vcxproj to open project in Visual Studio 2013. Hit F7 to build the project.

You’ll get error message:

Error 1 error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = ‘v100’) cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting “Upgrade Solution…”. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets

illustrator-wrong-target

Go to menu Project and select Retarget solution:

illustrator-retarget-project

This action converts project into project for VS 2013. Hit F7 for build.

After several seconds compilation fails and you’ll get another error message:

Error 20 error RC1015: cannot open include file ‘afxres.h’. C:\idea\Adobe Illustrator CC SDK\samplecode\LiveDropShadow\Resources\LiveDropShadow.rc 26 1 LiveDropShadow

illustrator-visualstudio

Double click error message and you’ll see problematic code.

illustrator-problematic-code-01

Problematic is include of afxres.h. It is reference to MFC library which is not part of Visual Studio Express 2013 edition. MFC is available only in Professional version. Do not worry. For many plugins you do not need MFC.

You can disable this include. There is also another problem few lines below with language code. We can disable this line of code for time being.

illustrator-problematic-code-02Hit F7. You’ll get error message that points into VersionInfo.rc file. There are several defines referencing MFC. You can disable those line for time being. (FILEFLAGMASK, FILEOS, FILETYPE, FILESUBTYPE)

illustrator-problematic-code-03

Hit F7 and now you’ll get AIP package :)

illustrator-visualstudio-success-build

Open Illustrator and configure path to Additional Plug-ins folder. Click Edit – Preferences – Plug-ins & Scratch Disks and set path to the folder where Visual Studio produced that aip file. It will be in directory Adobe Illustrator CC SDK\samplecode\output\win….

illustrator-preferences

Click OK, restart Illustrator.

Tadaaa, plug-in is working:

illustrator-working-01

Result:

illustrator-working-02

For more information about plug-ins read getting-started-guide.pdf document in SDK directory docs\guides. :-)

 

12. July 2013

How to decode stereogram by Photoshop

Stereograms are funny. Some stereograms are very easy. Sometimes it’s very hard to decode the content of stereogram.

If you can’t see the content of stereogram there is still way how to see it. You can use Photoshop.

Here is stereogram (Magic Eye Picture) created by Easy stereogram builder.

stereogram-sampleOpen the file in Photoshop. Select whole content and copy it into new layer (CTRL+A, CTRL+C, CTRL+Shift+N, CTRL+V).

Right click on the newly created layer and choose Blending options, set Blend Mode to Difference. The image should change to complete black.

photoshop-blending-options

Change to Move tool (press V) and start moving with the new layer to the right. After small move image should appear.

stereogram-photoshop-resultEasy :-)

You can play with further Photoshop filters to produce a better result.

4. May 2013

How to stitch maps by Photoshop

Photoshop is very handy tool when you need to stitch several images together. It is also possible to stitch maps from smaller images into one bigger. This is useful when you’re planning trip somewhere and you do not have a paper map. You can create screenshots from OpenStreetMap and stitch them together in Photoshop.

Step 1. Create screenshots of maps and store these files it into directory. Images should overlap. Use PNG format to avoid blur in images.

Windows users can use Snipping tool. Mac users can use Command + F4.

snipping-tools

Step 2. Open Photoshop. Go to menu FileAutomatePhotomarge

photomerge-01

Step 3. Select files LayoutReposition. Uncheck Blend Images Together. Browse files or folder. Click Ok and wait.

photomerge-02

If overlap region of screenshots was sufficient then result image will be ok.

24. February 2011

Materials – Developing apps for Google Android

You can access materials from my talk at FRI Žilina: PDF, SlideShare

Update:

– Facebook group for Android fans not only from Žilina: ZAndroid

– video material is available at www.mojandroid.sk

14. January 2011

How to introspect AMF communication

BlazeDS provides an optimized binary protocol for transferring data known as AMF protocol.

AMF is fast and it has support for transfer of complex objects. Specification of AMF is available at Sourceforge.net.

The only problem is how to introspect it?

AMF is binary. Therefore normal POST dump or Wireshark dump are not useful.

One solution was to use Flash Builder, but it is quite big and it requires big installation and license and so on.

Piotr Walczyszyn released incredibly simple and powerful AMF introspection tool – Toaster Lite. It acts as a proxy and it decodes all requests and responses.

Just install it. It’s quite small. Configure port and that’s it :-)

Check out Piotr’s video tutorial: