Till Startsidan

Skaffa webbhotell?
Läs JavaScript.nu's jämförelse av webbhotell.
Med priser från
9 kr / månad.

Genom ett samarbete får alla JavaScript.nu-
besökare dessutom 100 kr i rabatt vid beställning.


Re: Copy imagedata from img-tag

[ JavaScript.nu's Forum ] [ Viktigt om forumet ] [ JavaScript.nu's Startsida ]


Forum / Copy imagedata from img-tag
 
 
 
These links seem relevant:
http://stackoverflow.com/questions/934012/get-image-data-in-javascript
http://stackoverflow.com/questions/366145/image-manipulation-with-javascript

It is rather dependent on the browser though, since the <canvas> element is not (natively) supported in Internet Explorer, and probably not in most older web browsers.
Another, possibly easier, solution is to simply use a proxy for the image, and cache the image at server side.

Simon

I only need it to work in firefox, i tried the code but i keep ending up whit a image whit the right dimention, but its all transparant.

Its a png file, and what i could read, png is the ones that work best whit canvas.

Any ide how i can stop it from getting a transparant picture?

As that code is most likely working in the general case, you need to post some of the code you are using, and also the png image you are not able to read.

Simon

Postat av Simon (213.89.66.60) den 29 December, 2009 kl 21:15:28.
Som svar på: Re: Copy imagedata from img-tag postat av Puggan den 28 December, 2009 kl 15:24:13.


Svar på inlägget:


Posta ett svar:

Namn:
E-Mail:
Rubrik:
Meddelande:
Ja tack, maila mig om andra svarar på detta inlägg.
Ja tack, maila mig om andra svarar på mitt inlägg.


[ JavaScript.nu's Forum ] [ Viktigt om forumet ] [ JavaScript.nu's Startsida ]






Copyright © Omid Rouhani 1997-2010; Alla rättigheter reserverade.
Guider: [ HTML guide ] - [ JavaScript guide ] - [ DHTML guide ] - [ Perl guide ] - [ Sitemap ]