Rmagick issue

Hi all… i am working on rails version 1.2.3 (it is must to work on
version
1.2.3) & ruby 1.8.6. For my project i want to convert text in to images
files… so that i use rmagick… it is working fine for only english… i
need
to convert images for multiple languages. I have showed my code below

require “RMagick”
def show_textimg
bg = Magick::Image.new(120,20){self.background_color = “#9E9E9E”}
ad_text = Magick::Draw.new
ad_text.text(23,14,@ad.ad_text) # here the input text… only
working
good for english but i want to convert multi language. for example if i
pass
@ad.ad_text=“ドの半角⇔全角”
ad_text.draw(bg)
bg.write
“#{RAILS_ROOT}/public/ad/ad_picture/#{@ad.name}-textimg.jpg”
end

Is there any way for this.
Very soon Replies are greatly appreciate…

Thank,
Arun…

Please post your log here to see the error type for those scenarios.

2009/8/28 Arun K. [email protected]

for english but i want to convert multi language. for example if i pass

Thank,
Arun…


With regards,
Arunkumar B.
9789980534.
http://thinkingrails.blogspot.com

try with encoding option like this

require “RMagick”
def show_textimg
bg = Magick::Image.new(120,20){self.background_color = “#9E9E9E”}
ad_text = Magick::Draw.new
ad_text.encoding = “Unicode”
ad_text.text(23,14,@ad.ad_text) # here the input text… only working
good
for english but i want to convert multi language. for example if i pass
@ad.ad_text=“ドの半角⇔全角”
ad_text.draw(bg)
bg.write “#{RAILS_ROOT}/public/ad/ad_picture/#{@ad.name}-textimg.jpg”
end

On Mon, Aug 31, 2009 at 12:28 PM, Arunkumar B
[email protected]wrote:

require “RMagick”
Is there any way for this.


With regards,
Arunkumar B.
9789980534.
http://thinkingrails.blogspot.com


With regards,
Arunkumar B.
9789980534.
http://thinkingrails.blogspot.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs