Monday, September 27, 2010

Simple Solution: How to identify CMYK JPG and RGB JPG ?

CMYK JPEG Images could not be displayed properly across the various versions of Internet Explorer. Also it becomes necessary sometimes to identify the type of JPG image.

Yes, JPEG or JPG images are of two types. RGB JPG meant for display of Computer screen and CMYK JPG, primarily meant for printing purpose.

Through naked human eyes it is not possible to detect and identify the type of JPG file. There are various ways which can be used to detect the type of JPG. You can use PHP, ASP, Java to read the Exif Metadata of image to identify the Image. However, it requires you to write a program and understanding of the other basics of image handling tasks.

I did face the need to detect the type of JPG as I started getting Red Mark in IE using java program. If JPG is of CMYK, then you may get Red mark in Internet explorer in place of image. (As image file is missing). Also the thumbnail of CMYK JPG would be a solid blue or black color (or Inverted color) , instead of real image.

How to detect the CMYK JPG image?

Here ImageMagick will help you .

As you know ImageMagick provides is a set of API, libraries for Graphics handling which can be used with various programming language. ImageMagick also comes as a standalone suite for MS windows. The best part is , it comes as portable hence you need not to install it.

As a first step , download the ImageMagick suite from "http://www.imagemagick.org/download/binaries/ImageMagick-6.6.4-Q16-windows.zip "

Extract this zip file.It comes with various command line tools . The tool which matter for us here is “identify.exe” See what its documentation says

The identify program describes the format and characteristics of one or more image files. It also reports if an image is incomplete or corrupt. The information returned includes the image number, the file name, the width and height of the image, whether the image is colormapped or not, the number of colors in the image, the number of bytes in the image, the format of the image (JPEG, PNM, etc.), and finally the number of seconds it took to read and process the image.

-------------------------------------------------------------------------------------------------------

Now we will se how this tool will serve our purpose. Take any RGB JPG image , and copy it to location where “identify.exe" is placed. Now run the following command

D:\ImageMagick-6.6.4-7> Identify –verbose Imagefile.jpg

The Identify command display whole lot of information about image . To get pinpoint information about the type of Image you can Pipe and then filter results by using "Findstr" , a PowerShell command available in windows XP/vista/7. Use this command in following way for image named as "IndiaMap1.jpg".

RGB Colorspace image

D:\ImageMagick-6.6.4-7> Identify –verbose IndiaMap1.jpg |findstr /L “colorspace”

The result would be

Colorspace: RGB

If image is of CMYK type then the value of Colorspace will be “CMYK".

CMYK Colorspace Image

D:\ImageMagick-6.6.4-7> Identify –verboseIndiaMap2.jpg |findstr /L “colorspace”

The result would be

Colorspace: CMYK

You can use this command in following way to get info about multiple image files

D:\ImageMagick-6.6.4-7> Identify –verbose IndiaMap1. jpg IndiaMap2.jpg |findstr /L “colorspace”

Output would be

Colorspace: RGB

Colorspace: CMYK

So with the help of "Identify" command utility of ImageMagick Suite , you can identify the JPG type RGb or CMYK!

Happy identification !

Write your comments!

Thursday, September 23, 2010

Bulk SMS, MMS ban in India

A verdict in the Ram Janambhoomi-Babri Masjid title suit case is expected soon in India. As a precautionary measures and to curb rumors, the Indian government has imposed ban on bulk SMS and MMS services till September 29,2010.It is temporary measure.Though India is strongly democratic country , no one take this action of Govt as unusual.
I just tried to see whather it is in force or not. I logged in to my http://www.160by2.com/ website, a free bulk sms sending website. I noticed that they have implemnted Govt order strictly. when I tried to send a message , It showed following screen.
The Same I tried with another site http://www.smsgupshup.com/ . This site let me post the messages , but SMS was not deliverd. I am sure due to ban they wouldnot not deliver too.
I daily recives many SMSes from Google SMS channels. It has also stopped since morning.
Good job done by India's Ministry of Communications & Information Technology.
Peace is the need of the hour... Technology may come later.

Write your comments....

Wednesday, September 22, 2010

A workaround to Run IE 9 Beta and IE 8 simultaneously on same PC!

Run IE 9 or any other browser without installing it. May be , you don’t want to take a risk to install beta version / platform preview of IE or any browser on your existing windows having stable web browser.

After launching platform preview, Microsoft has recently launched Beta of Internet Explorer ver. 9. It has yet to release a final stable version.
If you want to try IE 9 you need to install it on your system. Being Beta version, chances are that it would affect the stability of your system. And if you are in between the web application development activities, it would be advised not to install at all any beta version. I did also come across the same situation, but fortunately I found what it called “Browser Sand boxing” methods.
Browser sand boxing can be achieved by various ways. However there are many popular ways.
1. Use Sandboxie , a standalone installable software
2. Use online Sandboxing methods
3. Use virtualization

The first method i.e. use of Sandboxie software (http://www.sandboxie.com/index.php?DownloadSandboxie) requires driver to be install on your system. If you don’t have sufficient privileges on your system to disable firewalls or you don’t want to install that driver, you will be refrain from using it. Also Sandboxie is not a freeware , it comes with 30 day evaluation license.

The web based online Sandboxing methods seems to be pretty cool. One such solution provider is http://www.spoon.net/browsers/. Here you will find whole lot of web browsers available. The use of these services also requires plug-in to be installed. Once plug-in is installed you can run many web browser having different version from single desktop. Take a case, you may see the Six different version of IE , Six different versions of Firefox etc on this site. Just click on desired version of browser and it will run in new window.

In fact it is extremely helpful to test your web application in different browsers. You can also test websites’ web pages look and feel across various browsers. The crux is , no need to install any of browser , but you can use it seamlessly.

The only limitation so far is it works with Microsoft Windows, not with Ubuntu or any other Linux. Hope so that it will be available on other platform too.

Write your Comments...