Hi André,
 
Effectively, 600² is not too much for JS. But to get this array from JS, I
have to use a XMLHTTP request to the server. The server response will be a
text stream send to JS. The size of the text stream will be :
- for 8bits images : 600 x 600 x (3 chars, to represent the lookup table
index as text) = 1080000 bytes. So 1 MB to transfert....
- for 24bits images : 600 x 600 x 3 (for RGB values) x (3 chars for each
color value) = 3240000 bytes. So 3 MB to transfert...
 
Perhaps can I use another kind of stream ??
 
Nicolas

  _____  

De : [email protected] [mailto:[EMAIL PROTECTED]
De la part de Andre M. Winter - Carto.net
Envoyé : mercredi 22 juin 2005 14:22
À : [email protected]
Objet : Re: [svg-developers] Re: Value of a pixel


hi nicolas,

you should be able to place the color value (or whatever value) info per px
in a 2-dim js-array and access this on mousemove based on some returned
screen coords. 600² is a lot but not too much for js.

andré


-- 
___________________________________________________________________
andre m. winter,
  cartography for internet and multimedia applications
  schiessstand 4/1, a6091 goetzens, tyrol, austria
  tel.: ++43.5234.32732
  email: <[EMAIL PROTECTED]>

<http://www.vectoreal.com/>          SVG consulting and development
<http://www.carto.net/>          online cartography focusing on SVG
<http://www.carto.at/>     print and online touristic map solutions 

>Hi Holger, Andreas, and all
> 
>In fact, I allready use MapServer to produce the map which is displayed
>using SVG (as background of a map with some vector layers send using
XMLHTTP
>and a simplified GML-like format parsed in javascript). 
>The raster layer is used to display thematic products and my goal is to
move
>a client side cursor on legend when I move the mouse over the image. For
>this reason, I can't send a request to the server at each mouse move.
>Images should have a size of 600x600 pixels. I can't use the method
>described by Holger because of the size of data to transfert.
>Another solution should be to vectorize the image before send to SVG. But
>images are too complex and the XML (using GML or SVG format) of the image
>may be too big to download. This solution requires also too server-side
>ressources.
> 
>So... I think there is no way using javascript... Perhaps using an ActiveX
>control (I'm on IE), but I'm also in a wide Extranet and I can't force the
>installation of it.
> 
>Thanks a lot for your response.
>
>  _____  
>
>De : [email protected] [mailto:[EMAIL PROTECTED]
>De la part de Andreas Neumann
>Envoyé : mardi 21 juin 2005 18:30
>À : [email protected]
>Objet : [svg-developers] Re: Value of a pixel
>
>
>Currently, until SVG 1.2 (or 2.0?) provides this function I would use a
>webserver for that 
>purpose.
>
>For geo/carto data there is the UMN mapserver who can send back pixel
>values. The 
>requests can be sent through a URL. (see
>http://mapserver.gis.umn.edu/doc44/raster-
>howto.html#query) - mapserver can also do more complex raster queries than
>just simple 
>pixel values.
>
>The idea that Holger proposes might be possible, but likely to be
>complicated to 
>implement and slow, because javascript is not very fast for things like
>image-processing.
>
>Andreas
>
>--- In [email protected], "Nicolas BOUTET" <[EMAIL PROTECTED]>
>wrote:
>  
>
>>Hi,
>> 
>>does someone know if it's possible (and how), using ECMAScript, to get the
>>RGB value (or LookUpTable index) of a pixel (using X,Y coordinates) of an
>>image item.
>> 
>>Thanks
>> 
>>Nicolas
>>
>>
>>[Non-text portions of this message have been removed]
>>    
>>
>
>
>
>
>-----
>To unsubscribe send a message to:
[EMAIL PROTECTED]
>-or-
>visit http://groups.yahoo.com/group/svg-developers and click "edit my
>membership"
>---- 
>
>
>
>  _____  
>
>Yahoo! Groups Links
>
>
>*      To visit your group on the web, go to:
>http://groups.yahoo.com/group/svg-developers/
>  
>
>*      To unsubscribe from this group, send an email to:
>[EMAIL PROTECTED]
><mailto:[EMAIL PROTECTED]> 
>  
>
>*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
><http://docs.yahoo.com/info/terms/> . 
>
>
>
>
>[Non-text portions of this message have been removed]
>
>
>
>-----
>To unsubscribe send a message to:
[EMAIL PROTECTED]
>-or-
>visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
>---- 
>Yahoo! Groups Links
>
>
>
> 
>
>
>  
>




-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
---- 



  _____  

Yahoo! Groups Links


*       To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
  

*       To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
  

*       Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]



-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to