Hacked By MMA Defacer 

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Hacked By MMA Defacer

Ashiyane Digital Security Team



[ add comment ]   |  [ 0 trackbacks ]   |  related link

Processing image in the browser with HTML5 canvas and filters 

Bookmark and Share

This image is not grayscale!


This image above is in grayscale in your browser but it is not the case on the server file system (check this link). There is no image processing done server side either by a (PHP) script or an Apache add-on. Color swapping is performed client side (aka in your browser) thanks to the JavaScript script below. For all browsers but IE, we rely on a new HTML5 feature: canvas. For IE, we use an old (but efficient) Microsoft technology: DirectX filters (yes, the same one used to manage correctly PNG image opacity in IE6).


function createCanvas(image){
// create a new canvas element
var myCanvas = document.createElement("canvas");
var myCanvasContext = myCanvas.getContext("2d");
var imgWidth=image.width;
var imgHeight=image.height;
myCanvas.width= imgWidth;
myCanvas.height = imgHeight;
myCanvasContext.drawImage(image,0,0);
var imageData = myCanvasContext.getImageData(0,0, imgWidth, imgHeight);
var data = imageData.data;
for (j=0; j<imageData.width; j++)
{
for (i=0; i<imageData.height; i++)
{
// index: red, green, blue, alpha, red, green, blue, alpha..etc.
var index=(i*4)*imageData.width+(j*4);
var gray = 0.33 * data[index] + 0.5 * data[index+1] + 0.16 * data[index+2] ;
data[index] = data[index+1] = data[index+2] = gray;
}
}
myCanvasContext.putImageData(imageData,0,0,0,0, imageData.width, imageData.height);
document.getElementById("canvas_target").appendChild(myCanvas);
};

function createFilter(image){
image.style.filter = 'progid:DXImageTransform.Microsoft.BasicImage(grayScale=1)';
document.getElementById("canvas_target").appendChild(image);
};
//Main
var img = new Image();
img.onload = function (){
if(navigator.userAgent.toLowerCase().indexOf("msie") != -1){
createFilter(img);
}else{
createCanvas(img);
}
}
img.src = "images/canvas.png";

This solution is useful to decrease the server charge without hosting pre-processed image sets on the file system (mainly if there are several possible filters). On the other side, we do not know well the processing time in the browser which depends on the browser brand and version but also on the hardware.

What is described in this article with grayscale remains true with other filters. For example we can invert colors of an image with next code

//IE
image.style.filter = 'progid: DXImageTransform.Microsoft.BasicImage(invert=1)';
//Other browsers
data[index] = 255 - data[index];
data[index+1] = 255 - data[index];
data[index+2] = 255 - data[index];


Update (9 Dec. 2010): canvas are subject to the same origin policy when manipulating image: the source image has to be on the same domain as the script (see the official spec).

Bookmark and Share


[ add comment ]   |  [ 0 trackbacks ]

A new ViaMichelin Web Mapping product: the JavaScript API V2 

Bookmark and Share


A little bit less than 3 months ago, I wrote an article in this blog about the ViaMichelin REST API, the latest B2B product at that time of my company. Today I'm proud to announce my team released a new product called the ViaMichelin JavaScript API V2.

ViaMichelin JavaScript API V2 is the new generation of JavaScript API dedicated to web mapping. It is built on the ViaMichelin REST API and replaces the older V1 which is now deprecated.

The main features are
-dynamic maps with smooth navigation (pan&scan, zoom in/out with mouse wheel)
-similar look and feel to ViaMichelin B2C website.
-designed to mobile devices
-native availability of thousands of service POI (gas station, schools, cash dispenser, etc);
-traffic information
-powerful POI finding functions (by road, along a route) easily bound to a map
-a powerful route planner (driving, pedestrian, cycling) also easily bound to a map

and several other improvements that ease the integration process.

Check out the tutorial , the examples and the reference to get your own idea of the product.

This is not a free API but you can easily get a trial period.

Note: This blog entry is not an official statement from my Company.

Read More...

[ add comment ]   |  [ 0 trackbacks ]

Creating Google Street View videos from itineraries 

Bookmark and Share


UPDATE (21th Sept 2010): upgrade with a new algorithm to process mono-label roads like the Boulevard Périphérique of Paris. Now, part of the article is not fully up-to-date with the script code.

UPDATE (14th Sept 2010): upgrade with iti trace overlay. Moreover new ffmpeg settings give a far better video quality. All videos have been regenerated.

UPDATE (12th Sept 2010): upgrade with HD mode (1280*720) and code refactoring.

UPDATE (8th Sept 2010): upgrade with distance overlay.



From Paris,Fr to Orléans,FR (133Km) with Street View panoramas (HD: on, overlay: on)



Boulevard Périphérique of Paris (35Km) with Street View panoramas (HD: on, overlay: on)


You found those videos really great? In this article, I describe how to process Street Views panoramas completely server-side to create them.

Read More...

[ add comment ]   |  [ 0 trackbacks ]

Setting up continuous integration with Hudson, Ant and PHPUnit 

Bookmark and Share


Very lately at ViaMichelin, we set up a continuous integration tool chain to test our new REST API product I talk about in a previous article.
The main idea here is to keep in one unique file all URLs to test, generate one basic PHPUnit test per URL (via PHP script) then execute the whole test suite (via PHPUnit framework). The process is launched and supervised by a CI server (Hudson+Ant).


Read More...

[ add comment ]   |  [ 0 trackbacks ]

Using Google Maps offline - part 2: create dynamic maps 

Bookmark and Share


please read carefully the disclaimer here-under.


The use of the Google Maps API described in this article does not respect the Terms of Service especially clause 10.3 regarding (local) storage of map tiles for reuse. This is purely experimental and reuse must not be considered.
So Mr. Phelps, should you or any of your IT force be caught or killed, I will disavow any knowledge of your actions.



In part 1 of this article serie, we set an application to create static images from a tileset but what if we want now to enjoy offline all fancy features provided by Google Maps interface like zoom level navigation and pan & scan?

We have already seen that tile retrieval was not really a problem. Indeed we just need to take care of several zoom levels instead of one. The main problem here is that we cannot use Google Maps API because it is not a library that can be loaded offline (at least as far as I know). Hopefully, there is an open source JavaScript library for displaying map data in web browsers that can be stored on our file system and use offline: it is called Open Layers.

Read More...

[ add comment ]   |  [ 0 trackbacks ]   |  related link

What would the World look like if sea levels rose up to 500m? 

Bookmark and Share


The question in the title of this article is quite interesting, isn't it?

In all previous articles,we always played in a 2 dimension space where geo-coordinates are reduced either to longitude and latitude or (x and y in pixel-space) and by so forgot the last dimension: elevation. True geo-coordinates have always those 3 components and it was quite difficult to access the elevation one through Google services. Google changed this first by introducing the Terrain base map in November 2007 then the elevation API. Several mashups use now those features to provide hikers or bikers with nice elevation profiles.
In this project we play with altitude by creating rasters of the whole World taking dynamically into account a global elevation of sea levels in the 0-500m range, in the same spirit but better (I hope so!) than Sea Level Rise Explorer, Global food Map or Global Sea Level Rise Map mashups.

Read More...

[ add comment ]   |  [ 0 trackbacks ]

A new ViaMichelin Web Mapping product: the REST API 

Bookmark and Share


As you may know if you checked the About page, I'm currently the Technical Manager in charge of B2B products of ViaMichelin (a wholly-owned subsidiary of the Michelin Group designing developing and marketing digital travel assistance products and services for road users throughout Europe).
Very lately, my team released a new product called ViaMichelin REST API that allows you to geocode, to perform proximity searches, to plan routes, and to display static maps, that means everything you expect from a great Web Mapping product. It's a fully cross-platform product using only standard protocols (HTTP, XML, JSON) and relies on the same framework that serves some of B2C 400 million visitors per year.
Check out the tutorial and the documentation of available services to get your own idea of the product. To ease the integration process, we provide libraries in PHP, Java and JavaScript that encapsulate all the complexity of URL building (available from the tutorial page).

It is only the first release and coming ones will provide new services and more flexibility to existing ones (with new parameters).

This is not a free API but you can easily get a trial period.

Note: This blog entry is not an official statement from my Company.

Read More...

[ add comment ]   |  [ 0 trackbacks ]

Create beautiful tiled heat maps with PHP and GD 

Bookmark and Share

This is without any doubt the most time consuming project so far on this blog. Hopefully this is also the most rewarding too because I like very much the results. I have always been fascinated by geographic heat maps and I spent several weeks to know how I could draw them with PHP and GD library, similarly to that of HeatMap API. As you can guess, you can read this article because I finally got a satisfying results :)

Basically, A geo heat map is a heat map based on geo data and is mostly used to easily visualize the geographic density of a data thanks to a color gradient and clustering of spots.
To explain how it works, our geo data are the 1.171 McDonald's restaurants located in France.
Read More...

[ add comment ]   |  [ 0 trackbacks ]

Using Google Maps offline - part 1: create static maps 

Bookmark and Share


First of all and one more time, here a little but very important warning telling you how evil I can be:


The use of the Google Maps API described in this article does not respect the Terms of Service especially clause 10.2.b regarding map tile stitching. This is purely experimental and reuse must not be considered.
So Mr. Phelps, should you or any of your IT force be caught or killed, I will disavow any knowledge of your actions.



I often need to travel with maps and despite the electronic age and my huge interest in web mapping, I always use paper maps for several reasons. Strangely enough, I do own neither a mobile internet device nor a GPS device. Anyway, more often than not in my case it would not be very useful because I'm either abroad (and roaming costs are expensive) or in mountains (with a lack of either 3G network coverage or electricity network or both).
I usually travel with my netbook, a 1.2kg Lenovo IdeaPas S10 with long-life power cells, so my idea to preload maps of interest over low-cost Wi-Fi before using them offline during my journey.
Preloaded maps can be either static or dynamic. I will talk about both in 2 different articles. This one talks only about static maps.
Read More...

[ add comment ]   |  [ 0 trackbacks ]   |  related link

| 1 | 2 | 3 | Next> Last>>