Page 1 of 2

Show Image with XML

Posted: 01 Oct 2007 22:15
by cavagnaro
hi guys,
Does anybody has been sucessfull deploying something on XML to show an image (jpg or PNG) on the IPTouch screen? I'm breaking my head trying to deploy such thing. Any ideas?
I encoded the image on base_64 and nothing but i tried this simple image:
http://dean.edwards.name/weblog/2005/06/base64-ie/
and it worked....

Any idea?

Re: Show Image with XML

Posted: 11 Nov 2007 09:13
by frank
Hey Cavagnaro,

I was able to display an image, with the help of a button. So once you push the soft key button on a 4068, it would display the image. What I was trying to do is display the image when the set is IDLE. That I never succeeded, and gave up ..

Re: Show Image with XML

Posted: 11 Nov 2007 18:39
by cavagnaro
cool Frank,
can you share your button image code please?
For what i read whoeing the image on idle state is not possible, we have asked PS to do it and waiting for them to know it...

Re: Show Image with XML

Posted: 13 Jul 2008 22:45
by spring
Do you have any good new for show image on 4038 and 4068 phones

Re: Show Image with XML

Posted: 14 Jul 2008 10:49
by cavagnaro
yeah, put them on base64 and will work

Re: Show Image with XML

Posted: 31 Dec 2008 04:20
by AAAAAA
hi can sombody tell me how to display image in ip phone , I just want to know the value to be provided in <Gdata> tag , i mean whether i have to give the ip address of the jpg,png file.

Re: Show Image with XML

Posted: 02 Jan 2009 13:09
by cavagnaro
convert the image to base64 and then put the string result between the <gdata></gdata>

Re: Show Image with XML

Posted: 17 Feb 2009 11:54
by Malab29
Cavagnaro, with which tools do you manage to convert your image in Base64 ?

I'm developping a Java application with Struts and convert the image using the Axis method encode( String ) of the class org.apache.axis.encoding.Base64

The image I try to display on a IP Touch 4038 / IP Touch 4068 is given in file attachment (terre2.jpg)

And here the generated code I send to the PRS to display the picture on the phone :

Code: Select all

<formImageFull name="">
	<title>Terre</title>
	<help>Affiche la photo de votre correspondant</help>
	<back>
		<url>http://localhost:8080/PictureOnPhone/closeManually.do</url>
	</back>
	<image>
		<Gdata>/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4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9std0evQr+0VnueNePz+j8fXgcnHlx7c+m0f1zWh4WsGuZPtc8KG1wdokGQ56dPQVD8YtLNpqFprC5AmAhT+pAP5cD9faqWgeK7X+zIIGmSCWJQpVjgHHfPvXt4jF1VgUqMbvZ+Q/FrYaKxLlL1Oyk1PU7OZkPxryIgsJIlVNvPTBP+fftWnvD9nUs80/CT5pUH6HHFZc2tcferHvdXUROzP90Z56f56cV8y67xElT5Un5denyNm33DVL5My/OpKAlgrAkY616R8N7s3fgy3YLhVd1Xd1xnP8ya+fZ9RnlmLIxMr5BwM7s9sV9D+DdHfQ/CGm6fLxNHFulHo7HcR+BOPwr2JZdTwa0d2/6T8YFylJsua/oVl4P0mbTr5MxSDIYfeRh0ZT2Ir568S+BdX8L3TLLH5tqT+7uEHysPf0Psf1r6aAqnfadb6jCYrhSVIxwa0oYiVJ+R2V8PGquzPnPzIrq8sYRu+ZBsYY5GOn6Yqtqlt5832VJnMiA5VFzvfgKj/XP+NexXHww0iWQvDPPBnqI2I/kRVvSfh9o+lyCSPzXcfxMea5adGjTxMsSm+6Xa5xrAVOrRyXw8+Gb2lxBrWtIPOTD29uedp7M3uOw/OvXKbHGkUYRBhR0FOrWpUlUldno0qUacbI/9k=</Gdata>
	</image>
	<timeout>
		<delay>1</delay>
		<url>http://localhost:8080/PictureOnPhone/checkRemovePicture.do</url>
	</timeout>
	<OK_button>
		<url>http://localhost:8080/PictureOnPhone/closeManually.do</url>
	</OK_button>
</formImageFull>
Do you get the same image with your encoding Base64 method ?

Re: Show Image with XML

Posted: 17 Feb 2009 12:29
by cavagnaro
Yes, I use only PHP for the base64 encoding. Once I faced an issue with an image that never appeared and what it was is that it was a JPEG but with a different filter, opened with mspaint, resaved with another name and problem solved.

Re: Show Image with XML

Posted: 18 Feb 2009 03:48
by Malab29
Thanks for your reply.

I have already managed to display the correct picture on phone screen using a PHP application. I will post if I find a solution in Java.

Here the PHP code of my main page to display a single image, it can be useful for XML API beginners.

main.php

Code: Select all

<?php
header("Content-Type: text/XML; charset=UTF-8");

function encodeImgBase64(){
	$imgFilename = "./img/terre2.jpg";
	
	$handle = fopen($imgFilename, "r");
	$contents = fread($handle, filesize($imgFilename));
	fclose($handle);
	
	$encodedStr = base64_encode ($contents );
	
	return $encodedStr;
}
?>
<?xml version="1.0" encoding="UTF-8"?>


<formImageFull name="DebugDisplayImage" xmlns="http://www.alcatel.fr/IPT/v1.1" >
	<title>Afficher Image</title>
	<help>Afficher une image</help>
	<back>
		<url><?php print( http://localhost/DEBUG/DisplayImage/close.php" ); ?></url>
	</back>
	<image>
		<Gdata><?php echo encodeImgBase64(); ?></Gdata>
	</image>
</formImageFull>
close.php

Code: Select all

<?php
	header("Content-Type: text/XML; charset=UTF-8");
	echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>
<sessionClose xmlns="http://www.alcatel.fr/IPT/v1.1" />