Skip to main content

Microsoft Silverlight

Answered Question Urgent: a way to draw text annotation on image and save the drawingRSS Feed

(0)

jo2fong
jo2fong

Member

Member

2 points

12 Posts

Urgent: a way to draw text annotation on image and save the drawing

as topic.

codeblock
codeblock

Contributor

Contributor

4060 points

716 Posts

Silverlight MVP

Re: Urgent: a way to draw text annotation on image and save the drawing

Not so simple. You have to write the text and the image pixel by pixel using a WriteableBitmap. This because after using Render() on a WriteableBitmap it is locked due to DRM and you are unable to access pixels. So the only way is to write pixels and then read them.

HTH 

If this answers your question, please "mark it as answer"

--
Andrea Boschin
MVP Silverlight & Silverlight Insider
, Me on Twitter

jo2fong
jo2fong

Member

Member

2 points

12 Posts

Re: Urgent: a way to draw text annotation on image and save the drawing

How could i write the text by pixel into the image?
Could you give an example how can i achieve this? what is "DRM" actually?

 

codeblock
codeblock

Contributor

Contributor

4060 points

716 Posts

Silverlight MVP
Answered Question

Re: Re: Urgent: a way to draw text annotation on image and save the drawing

> How could i write the text by pixel into the image?

WriteableBitmap lt you access the pixes of a bitmap

http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2009/03/18/Silverlight-3-_1320_-The-Bitmap-API-_2F00_-WriteableBitmap.aspx

drawing text is not really simple. You have to simulate a font and by code write it pixel-by-pixel in the bitmap.

> what is "DRM" actually?

DRM stands for Digital Rights Management

hth

If this answers your question, please "mark it as answer"

--
Andrea Boschin
MVP Silverlight & Silverlight Insider
, Me on Twitter
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities