Forums Últimos mensajes - Powered by IBM
 

Convertir Numeros a una imagen GIF

16/07/2008 - 03:36 por David A. Ortega | Informe spam
Hola Foro.
Me pasaron una direccion de un Web Service en el cual solicito la imagen
de la posición actual de un carro, asi que estoy consumiendo el
servicio, y como resultado me da un XML, dentro de sus Nodos este valor
que les muestro a continuación:

.71.73.70.56.55.97.92.0.46.0.119.0.0.44.0.0.0.0.92.0.46.0.135.0.0.0.0.0.248.240.173.146.208.0.0.144.151.144.237.193.173.184.44.16.240.97.40.0.112.184.40.100.40.152.104.88.200.159.144.209.129.88.240.245.240.56.120.152.16.52.16.240.80.24.204.200.184.96.94.85.112.172.200.188.120.92.208.156.120.208.61.16.232.216.208.184.64.32.184.188.185.48.148.200.214.104.68.56.119.56.8.12.248.192.138.104.160.180.160.120.125.117.208.212.208.201.180.160.64.67.63.240.138.89.77.81.248.144.143.126.161.165.248.120.124.248.80.40.208.240.115.64.8.120.184.88.88.80.216.172.128.207.182.168.200.93.56.16.20.16.186.174.146.64.136.64.240.200.184.232.233.224.216.192.184.80.164.200.192.145.128.120.113.96.136.141.135.232.204.160.208.12.8.224.228.224.148.204.148.160.164.152.56.60.56.224.112.56.224.70.16.32.112.168.240.131.72.222.211.184.40.44.248.208.148.112.230.91.38.240.146.108.224.168.120.224.186.145.152.120.112.128.180.208.240.204.152.200.192.168.192.48.16.248.252.248.200.165.152.112.172.112.222.180.136.237.
210.193.224.234.224.184.125.104.72.75.72.160.156.136.32.140.192.32.76.32.238.231.208.208.236.208.72.156.200.184.187.176.200.204.248.220.193.174.232.240.232.192.152.128.200.148.112.128.135.128.240.212.168.61.93.61.232.197.144.170.158.144.48.140.192.240.104.48.190.76.41.148.152.248.16.132.192.96.164.200.216.151.104.200.104.64.240.107.56.216.211.200.168.172.168.240.224.192.60.64.248.237.154.120.240.208.160.48.52.48.184.188.248.96.99.96.80.159.80.184.48..16.208.155.128.16.20.248.56.124.56.168.216.168.200.205.200.240.148.96.92.96.248.208.172.144.208.42.38.112.116.112.221.203.192.192.132.104.240.123.73.53.77.53.129.127.110.168.168.157.152.157.150.240.133.80.200.172.155.232.188.133.212.173.136.233.236.232.185.184.166.208.118.76.192.154.136.192.196.188.184.52.24.164.109.92.145.188.208.40.44.40.0.120.184.208.162.128.148.150.136.224.162.112.232.75.16.224.226.215.200.55.16.80.83.79.232.212.176.234.189.144.224.192.144.72.112.72.216.140.96.216.185.176.80.140.192.236.228.216.191.137.120.104
.104.96.216.64.16.224.228.248.248.156.104.29.33.248.218.162.132.240.88.32.176.180.176.220.218.212.32.36.32.220.218.200.220.206.176.156.134.120.208.174.160.88.91.88.240.84.24.184.128.112.200.160.128.222.188.136.192.98.68.239.227.200.220.200.156.240.220.184.232.208.168.240.233.224.200.108.64.192.86.48.216.212.192.203.205.192.176.174.157.180.166.156.64.132.64.234.219.194.240.100.48.232.221.216.208.112.72.120.136.120.184.120.104.240.240.224.116.115.104.240.109.48.192.69.35.240.188.156.224.174.124.132.132.120.120.192.120.240.144.88.240.164.136.232.196.160.208.166.136.170.157.136.201.186.158.200.149.120.104.100.88.208.211.200.176.180.168.240.236.216.144.108.96.152.146.125.120.120.114.201.195.176.224.209.200.88.172.88.48.108.48.160.165.160.240.120.64.192.52.16.192.189.176.192.201.192.40.84.40.72.72.64.192.137.112.240.201.176.72.148.72.184.58.26.240.216.176.232.216.184.217.196.185.224.209.192.240.112.56.192.192.184.104.116.104.240.242.232.200.118.72.8.255.0.155.8.28.72.176.160.193.13
1.8.19.42.92.104.176.212.13.40.16.33.250.187.113.134.161.197.139.24.51.50.20.147.46.34.196.71.145.52.138.28.73.18.97.164.71.30.161.164.19.83.178.165.203.140.103.110.248.75.121.163.84.194.36.207.236.189.220.89.82.204.161.148.46.186.29.196.105.239.137.133.79.60.147.102.236.21.37.165.179.27.5.175.81.194.96.52.8.132.171.74.179.46.236.182.32.37.148.74.74.4.74.173.198.199.130.213.171.104.181.170.53.216.11.101.202.26.221.32.49.168.102.192.44.218.187.88.215.234.21.227.194.107.131.95.107.12.132.58.139.23.237.129.68.209.18.35.106.161.151.103.204.124.94.161.8.38.92.24.194.97.65.142.226.68.116.22.141.113.227.150.164.110.232.75.217.64.0.229.194.7.218.9.34.177.111.215.85.143.206.16.125.46.169.228.6.45.143.5.72.84.70.43.75.181.182.125.178.240.122.108.16.109.246.200.41.55.46.64.204.189.251.106.111.109.218.84.4.175.12.91.182.113.140.103.40.172.33.54.3.137.235.221.178.84.64.255.111.55.125.247.174.205.157.175.91.252.103.207.192.6.36.229.11.203.218.167.77.16.249.230.87.213.56.122.149.56.218.98.2
45.10.37.1.7.31.238.28.129.223.46.251.144.96.223.1.248.89.150.200.43.142.168.1.1.128.11.73.85.212.6.6.154.23.135.35.130.36.194.32.126.225.9.242.219.119.19.82.104.144.92.129.89.144.97.101.187.80.179.159.135.13.238.178.161.125.241.229.101.162.64.167.24.51.89.115.45.238.55.68.51.13.90.54.196.43.67.124.88.217.141.111.188.32.88.43.248.53.51.228.16.18.54.216.27.102.113.52.247.73.43.238.0.232.73.49.151.184.211.202.39.120.241.240.65.21.14.66.72.13.137.230.209.39.136.116.205.5.17.138.1.47.188.97.156.84.84.29.85.24.60.57.196.35.5.23.3.176.230.218.0.128.2.122.23.160.250.189.2.227.110.65.88.96.192.26.167.84.244.153.92.100.217.85.216.44.208.196.195.193.30.128.4.170.233.166.155.70.104.165.5.79.96.64.201.53.179.157.145.227.142.133.241.48.139.25.102.172.35.195.30.217.84.255.177.233.14.133.212.186.105.33.129.238.134.165.1.112.120.98.92.146.75.238.22.8.59.138.152.145.192.50.200.238.209.67.100.204.122.132.151.155.6.24.115.138.113.255.96.96.128.151.187.73.18.2.52.138.104.177.206.31.224.254.81.14
3.58.92.4.96.238.185.131.12.114.174.185.176.176.241.69.17.230.94.245.137.5.124.84.195.0.36.22.53.171.239.190.252.246.235.239.191.0.123.229.202.190.3.7.108.240.193.8.67.228.74.42.169.100.82.48.105.110.52.252.112.194.20.87.156.82.30.14.32.224.192.32.110.132.144.82.8.14.8.33.196.32.169.228.97.241.201.20.55.144.137.200.34.167.64.178.201.16.101.178.2.203.66.164.209.112.3.40.231.12.112.38.8.172.48.51.203.27.155.156.135.207.63.11.145.194.198.153.232.172.180.190.254.144.147.135.6.68.179.140.64.201.121.60.29.181.200.8.24.18.8.29.51.45.237.53.68.116.104.243.74.19.129.184..65.244.204.153.100.178.113.195.102.71.157.202.2.208.53.65.135.71.141.140.128.199.44.80.4.98.55.222.39.219.255.221.8.68.57.236.157.82.35.172.140.48.66.74.77.180.163.184.54.77.208.35.51.2.105.100.226.6.203.54.167.173.65.207.153.108.163.120.59.218.108.67.79.215.80.52.162.139.46.80.156.51.194.57.13.52.192.202.57.57.176.126.14.233.60.180.46.59.223.128.159.19.72.68.166.227.93.247.21.179.224.28.145.46.35.232.210.72.14.17.249.
179.205.120.139.123.158.71.38.121.76.206.242.209.131.164.157.73.32.199.107.179.121.231.77.144.3.69.3.180.156.115.133.233.186.72.146.250.234.172.124.127.14.43.16.93.161.203.57.236.143.64.123.225.180.231.110.58.43.129.164.238.17.15.225.75.114.59.216.157.67.103.189.226.219.152.27.207.124.70.179.154.153.140.14.219.168.222.255.218.241.10.237.65.65.18.180.184.130.4.103.33.190.212.53.96.22.238.179.96.3.78.39.62.90.172.15.34.141.192.131.46.174.0.145.6.152.14.15.87.192.131.36.42.56.156.21.6.226.28.30.65.160.2.21.231.184.180.185.1.106.4.20.89.218.26.22.140.4.250.143.115.115.43.97.32.255.202.119.5.241.149.80.18.24.164.160.5.37.200.138.242.141.160.17.56.99.69.14.102.193.59.136.152.46.120.234.179.223.112.104.17.56.18.122.132.28.62.236.92.32.12.33.4.7.52.44.19.151.243.153.3.50.145.10.145.145.108.22.77.168.222.54.124.23.145.194.121.207.139.37.156.197.221.52.168.62.209.237.241.130.34.204.1.240.172.232.190.23.158.206.43.30.12.30.241.82.226.15.122.108.163.9.179.72.3.214.144.38.185.21.184.129.1
41.82.171.28.61.26.231.149.249.73.194.123.48.140.72.18.125.215.128.43.176.130.7.17.100.133.248.154.216.136.225.241.206.132.238.67.229.21.220.151.146.194.93.161.149.204.242.135.204.114.232.198.146.185.34.4.105.124.222.200.82.65.199.136.52.34.133.146.80.213.44.255.6.17.12.66.17.34.17.212.5.15.84.117.58.42.54.98.154.129.144.160.234.110.153.76.42.234.130.118.80.144.160.56.155.53.180.171.9.33.107.30.115.69.219.120.41.4.152.165.100.22.129.128.167.254.102.65.207.136.208.98.22.180.240.29.45.2.17.139.8.23.210.243.158.129.192.38.61.227.9.207.212.17.116.127.80.160.69.35.232.89.79.114.166.241.103.134.240.88.9.119.73.64.7.184.51.37.16.164.133.248.166.169.81.82.54.64.18.17.249.104.5.63.106.65.241.173.112.133.168.164.5.15.82.135.74.30.24.113.123.180.136.105.76.9.102.182.158.185.161.152.16.121.154.77.65.202.44.145.150.244.165.219.91.97.72.87.136.51.145.158.244.167.71.61.34.80.31.120.82.158.238.75.114.23.77.137.43.210.86.49.11.134.212.170.26.212.98.86.113.250.181.174.122.213.35.1.1.0


es el que se supone que es la imagen en formato GIF, y el cual contiene
los valores de cada pixel en una imagen GIF (según la referencia del web
service), pero no se como convertir este valor a un archivo GIF.

¿Alguien ha visto como convertir este tipo de valores a una imagen, en
especifico en formato GIF en ASP?.

De antemano gracias por la atención prestada.
Saludos.
 

Leer las respuestas

#1 Matias Iacono
16/07/2008 - 21:42 | Informe spam
Nunca vi un formato asi.

Pero parece que cada division por . representa un pixel. Y el numero, es el
valor de color del mismo.

Teniendo en cuenta que el GIF solo puede representar 256 colores
simulataneos, la escala de colores iria desde 0 a 255.

Donde 0 es NEGRO, y 255 es BLANCO. Dentro de este rango es la escala de
colores.

Definitivamente deberias conseguir alguna documentacion por parte del
proveedor del servicio web. Salvo que tengas acceso al codigo fuente.

Ahora, si lo que pienso es correcto, podrias tomar estos valores, crear una
nueva imagen y pintar pixel a pixel por cada valor sobre ella.

Posiblemente, en algun punto, tengas un caracter que represente un retorno
de carro, o el tamaño de la imagen en ancho y alto. Para que puedas saber en
que linea tienes que pintar que cosa.

A simple vista, parece que los .. representan estos saltos de linea. En todo
caso, estoy adivinando :)

Para dibujar una imagen, puedes entrar en mi blog:
http://mvpfiles.spaces.live.com

Alli encontraras varios ejemplos de como generar imagenes dinamicamente.

Saludos.

Matías Iacono
Microsoft MVP
Orador Regional INETA
http://mvpfiles.spaces.live.com


"David A. Ortega" wrote:

Hola Foro.
Me pasaron una direccion de un Web Service en el cual solicito la imagen
de la posición actual de un carro, asi que estoy consumiendo el
servicio, y como resultado me da un XML, dentro de sus Nodos este valor
que les muestro a continuación:

..71.73.70.56.55.97.92.0.46.0.119.0.0.44.0.0.0.0.92.0.46.0.135.0.0.0.0.0.248.240.173.146.208.0.0.144.151.144.237.193.173.184.44.16.240.97.40.0.112.184.40.100.40.152.104.88.200.159.144.209.129.88.240.245.240.56.120.152.16.52.16.240.80.24.204.200.184.96.94.85.112.172.200.188.120.92.208.156.120.208.61.16.232.216.208.184.64.32.184.188.185.48.148.200.214.104.68.56.119.56.8.12.248.192.138.104.160.180.160.120.125.117.208.212.208.201.180.160.64.67.63.240.138.89.77.81.248.144.143.126.161.165.248.120.124.248.80.40.208.240.115.64.8.120.184.88.88.80.216.172.128.207.182.168.200.93.56.16.20.16.186.174.146.64.136.64.240.200.184.232.233.224.216.192.184.80.164.200.192.145.128.120.113.96.136.141.135.232.204.160.208.12.8.224.228.224.148.204.148.160.164.152.56.60.56.224.112.56.224.70.16.32.112.168.240.131.72.222.211.184.40.44.248.208.148.112.230.91.38.240.146.108.224.168.120.224.186.145.152.120.112.128.180.208.240.204.152.200.192.168.192.48.16.248.252.248.200.165.152.112.172.112.222.180.136.237.
210.193.224.234.224.184.125.104.72.75.72.160.156.136.32.140.192.32.76.32.238.231.208.208.236.208.72.156.200.184.187.176.200.204.248.220.193.174.232.240.232.192.152.128.200.148.112.128.135.128.240.212.168.61.93.61.232.197.144.170.158.144.48.140.192.240.104.48.190.76.41.148.152.248.16.132.192.96.164.200.216.151.104.200.104.64.240.107.56.216.211.200.168.172.168.240.224.192.60.64.248.237.154.120.240.208.160.48.52.48.184.188.248.96.99.96.80.159.80.184.48..16.208.155.128.16.20.248.56.124.56.168.216.168.200.205.200.240.148.96.92.96.248.208.172.144.208.42.38.112.116.112.221.203.192.192.132.104.240.123.73.53.77.53.129.127.110.168.168.157.152.157.150.240.133.80.200.172.155.232.188.133.212.173.136.233.236.232.185.184.166.208.118.76.192.154.136.192.196.188.184.52.24.164.109.92.145.188.208.40.44.40.0.120.184.208.162.128.148.150.136.224.162.112.232.75.16.224.226.215.200.55.16.80.83.79.232.212.176.234.189.144.224.192.144.72.112.72.216.140.96.216.185.176.80.140.192.236.228.216.191.137.120.104
..104.96.216.64.16.224.228.248.248.156.104.29.33.248.218.162.132.240.88.32.176.180.176.220.218.212.32.36.32.220.218.200.220.206.176.156.134.120.208.174.160.88.91.88.240.84.24.184.128.112.200.160.128.222.188.136.192.98.68.239.227.200.220.200.156.240.220.184.232.208.168.240.233.224.200.108.64.192.86.48.216.212.192.203.205.192.176.174.157.180.166.156.64.132.64.234.219.194.240.100.48.232.221.216.208.112.72.120.136.120.184.120.104.240.240.224.116.115.104.240.109.48.192.69.35.240.188.156.224.174.124.132.132.120.120.192.120.240.144.88.240.164.136.232.196.160.208.166.136.170.157.136.201.186.158.200.149.120.104.100.88.208.211.200.176.180.168.240.236.216.144.108.96.152.146.125.120.120.114.201.195.176.224.209.200.88.172.88.48.108.48.160.165.160.240.120.64.192.52.16.192.189.176.192.201.192.40.84.40.72.72.64.192.137.112.240.201.176.72.148.72.184.58.26.240.216.176.232.216.184.217.196.185.224.209.192.240.112.56.192.192.184.104.116.104.240.242.232.200.118.72.8.255.0.155.8.28.72.176.160.193.13
1.8.19.42.92.104.176.212.13.40.16.33.250.187.113.134.161.197.139.24.51.50.20.147.46.34.196.71.145.52.138.28.73.18.97.164.71.30.161.164.19.83.178.165.203.140.103.110.248.75.121.163.84.194.36.207.236.189.220.89.82.204.161.148.46.186.29.196.105.239.137.133.79.60.147.102.236.21.37.165.179.27.5.175.81.194.96.52.8.132.171.74.179.46.236.182.32.37.148.74.74.4.74.173.198.199.130.213.171.104.181.170.53.216.11.101.202.26.221.32.49.168.102.192.44.218.187.88.215.234.21.227.194.107.131.95.107.12.132.58.139.23.237.129.68.209.18.35.106.161.151.103.204.124.94.161.8.38.92.24.194.97.65.142.226.68.116.22.141.113.227.150.164.110.232.75.217.64.0.229.194.7.218.9.34.177.111.215.85.143.206.16.125.46.169.228.6.45.143.5.72.84.70.43.75.181.182.125.178.240.122.108.16.109.246.200.41.55.46.64.204.189.251.106.111.109.218.84.4.175.12.91.182.113.140.103.40.172.33.54.3.137.235.221.178.84.64.255.111.55.125.247.174.205.157.175.91.252.103.207.192.6.36.229.11.203.218.167.77.16.249.230.87.213.56.122.149.56.218.98.2
45.10.37.1.7.31.238.28.129.223.46.251.144.96.223.1.248.89.150.200.43.142.168.1.1.128.11.73.85.212.6.6.154.23.135.35.130.36.194.32.126.225.9.242.219.119.19.82.104.144.92.129.89.144.97.101.187.80.179.159.135.13.238.178.161.125.241.229.101.162.64.167.24.51.89.115.45.238.55.68.51.13.90.54.196.43.67.124.88.217.141.111.188.32.88.43.248.53.51.228.16.18.54.216.27.102.113.52.247.73.43.238.0.232.73.49.151.184.211.202.39.120.241.240.65.21.14.66.72.13.137.230.209.39.136.116.205.5.17.138.1.47.188.97.156.84.84.29.85.24.60.57.196.35.5.23.3.176.230.218.0.128.2.122.23.160.250.189.2.227.110.65.88.96.192.26.167.84.244.153.92.100.217.85.216.44.208.196.195.193.30.128.4.170.233.166.155.70.104.165.5.79.96.64.201.53.179.157.145.227.142.133.241.48.139.25.102.172.35.195.30.217.84.255.177.233.14.133.212.186.105.33.129.238.134.165.1.112.120.98.92.146.75.238.22.8.59.138.152.145.192.50.200.238.209.67.100.204.122.132.151.155.6.24.115.138.113.255.96.96.128.151.187.73.18.2.52.138.104.177.206.31.224.254.81.14
3.58.92.4.96.238.185.131.12.114.174.185.176.176.241.69.17.230.94.245.137.5.124.84.195.0.36.22.53.171.239.190.252.246.235.239.191.0.123.229.202.190.3.7.108.240.193.8.67.228.74.42.169.100.82.48.105.110.52.252.112.194.20.87.156.82.30.14.32.224.192.32.110.132.144.82.8.14.8.33.196.32.169.228.97.241.201.20.55.144.137.200.34.167.64.178.201.16.101.178.2.203.66.164.209.112.3.40.231.12.112.38.8.172.48.51.203.27.155.156.135.207.63.11.145.194.198.153.232.172.180.190.254.144.147.135.6.68.179.140.64.201.121.60.29.181.200.8.24.18.8.29.51.45.237.53.68.116.104.243.74.19.129.184..65.244.204.153.100.178.113.195.102.71.157.202.2.208.53.65.135.71.141.140.128.199.44.80.4.98.55.222.39.219.255.221.8.68.57.236.157.82.35.172.140.48.66.74.77.180.163.184.54.77.208.35.51.2.105.100.226.6.203.54.167.173.65.207.153.108.163.120.59.218.108.67.79.215.80.52.162.139.46.80.156.51.194.57.13.52.192.202.57.57.176.126.14.233.60.180.46.59.223.128.159.19.72.68.166.227.93.247.21.179.224.28.145.46.35.232.210.72.14.17.249.
179.205.120.139.123.158.71.38.121.76.206.242.209.131.164.157.73.32.199.107.179.121.231.77.144.3.69.3.180.156.115.133.233.186.72.146.250.234.172.124.127.14.43.16.93.161.203.57.236.143.64.123.225.180.231.110.58.43.129.164.238.17.15.225.75.114.59.216.157.67.103.189.226.219.152.27.207.124.70.179.154.153.140.14.219.168.222.255.218.241.10.237.65.65.18.180.184.130.4.103.33.190.212.53.96.22.238.179.96.3.78.39.62.90.172.15.34.141.192.131.46.174.0.145.6.152.14.15.87.192.131.36.42.56.156.21.6.226.28.30.65.160.2.21.231.184.180.185.1.106.4.20.89.218.26.22.140.4.250.143.115.115.43.97.32.255.202.119.5.241.149.80.18.24.164.160.5.37.200.138.242.141.160.17.56.99.69.14.102.193.59.136.152.46.120.234.179.223.112.104.17.56.18.122.132.28.62.236.92.32.12.33.4.7.52.44.19.151.243.153.3.50.145.10.145.145.108.22.77.168.222.54.124.23.145.194.121.207.139.37.156.197.221.52.168.62.209.237.241.130.34.204.1.240.172.232.190.23.158.206.43.30.12.30.241.82.226.15.122.108.163.9.179.72.3.214.144.38.185.21.184.129.1
41.82.171.28.61.26.231.149.249.73.194.123.48.140.72.18.125.215.128.43.176.130.7.17.100.133.248.154.216.136.225.241.206.132.238.67.229.21.220.151.146.194.93.161.149.204.242.135.204.114.232.198.146.185.34.4.105.124.222.200.82.65.199.136.52.34.133.146.80.213.44.255.6.17.12.66.17.34.17.212.5.15.84.117.58.42.54.98.154.129.144.160.234.110.153.76.42.234.130.118.80.144.160.56.155.53.180.171.9.33.107.30.115.69.219.120.41.4.152.165.100.22.129.128.167.254.102.65.207.136.208.98.22.180.240.29.45.2.17.139.8.23.210.243.158.129.192.38.61.227.9.207.212.17.116.127.80.160.69.35.232.89.79.114.166.241.103.134.240.88.9.119.73.64.7.184.51.37.16.164.133.248.166.169.81.82.54.64.18.17.249.104.5.63.106.65.241.173.112.133.168.164.5.15.82.135.74.30.24.113.123.180.136.105.76.9.102.182.158.185.161.152.16.121.154.77.65.202.44.145.150.244.165.219.91.97.72.87.136.51.145.158.244.167.71.61.34.80.31.120.82.158.238.75.114.23.77.137.43.210.86.49.11.134.212.170.26.212.98.86.113.250.181.174.122.213.35.1.1.0


es el que se supone que es la imagen en formato GIF, y el cual contiene
los valores de cada pixel en una imagen GIF (según la referencia del web
service), pero no se como convertir este valor a un archivo GIF.

¿Alguien ha visto como convertir este tipo de valores a una imagen, en
especifico en formato GIF en ASP?.

De antemano gracias por la atención prestada.
Saludos.

Preguntas similares