SINHALA and J2ME
Re: SINHALA and J2ME
if i want to modify these pngfonts, what is the suitable image editor wich lets draw images without a background ?
Re: SINHALA and J2ME
I usually use Adobe Photoshop to draw images with a transparent background.
However there are methods to convert a font file straight to a PNG.
See How to convert a font to an image (PNG) using php
There are some software you can use as well. See following links.
http://www.lmnopc.com/bitmapfontbuilder/
http://www.angelcode.com/products/bmfont/
However there are methods to convert a font file straight to a PNG.
See How to convert a font to an image (PNG) using php
There are some software you can use as well. See following links.
http://www.lmnopc.com/bitmapfontbuilder/
http://www.angelcode.com/products/bmfont/
Re: SINHALA and J2ME
I generated a font image using below AUTOIT code. but it have a back ground color. i want to remove it.
Code: Select all
#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>
_Main()
Func _Main()
Local $hGUI, $hWnd, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout
_GDIPlus_Startup ()
$hBitmap= @DesktopDir & "/1.jpg"
$hImage = _GDIPlus_ImageLoadFromFile($hBitmap)
$hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage)
$hBrush = _GDIPlus_BrushCreateSolid (0xFF00007F)
$hFormat = _GDIPlus_StringFormatCreate ()
$hFamily = _GDIPlus_FontFamilyCreate ("Madhura")
$hFont = _GDIPlus_FontCreate ($hFamily, 10, 0)
$hPen = _GDIPlus_PenCreate ()
Global $asc = 32
while $asc<>256
$tLayout = _GDIPlus_RectFCreate (($asc-32)*15, 0, 400, 300)
_GDIPlus_GraphicsDrawStringEx ($hGraphic,Chr ($asc ) , $hFont, $tLayout, $hFormat, $hBrush)
;~ _GDIPlus_GraphicsDrawLine ($hGraphic, ($asc-32)*15, 0, ($asc-32)*15, 12, $hPen)
$asc+=1
wend
FileDelete(@DesktopDir & "/madura.png")
_GDIPlus_ImageSaveToFile($hImage, @DesktopDir & "/madura.png")
_GDIPlus_FontDispose ($hFont)
_GDIPlus_FontFamilyDispose ($hFamily)
_GDIPlus_StringFormatDispose ($hFormat)
_GDIPlus_BrushDispose ($hBrush)
_GDIPlus_GraphicsDispose ($hGraphic)
_GDIPlus_ShutDown ()
EndFunc
Re: SINHALA and J2ME
Okay. So it uses GD. I'm sure you must be able to find the method to make the background transparent.
The main problem I see is, you load a JPG as as your canvas. You don't want to do that.
It must be possible for you to find following functions from GD library and need to call them in order.
img = imagecreate (width, height);
background = ImageColorAllocate(img, 255, 255, 255);
ImageColorTransparent(img, background);
ImageInterlace(img, false);
Try using _GDIPlus_ as a prefix to above functions. ex: _GDIPlus_imagecreate.
The main problem I see is, you load a JPG as as your canvas. You don't want to do that.
It must be possible for you to find following functions from GD library and need to call them in order.
img = imagecreate (width, height);
background = ImageColorAllocate(img, 255, 255, 255);
ImageColorTransparent(img, background);
ImageInterlace(img, false);
Try using _GDIPlus_ as a prefix to above functions. ex: _GDIPlus_imagecreate.
Re: SINHALA and J2ME
This is not quit right. I thought it is the standard GD, not GDI.Neo wrote:Okay. So it uses GD. I'm sure you must be able to find the method to make the background transparent.
The main problem I see is, you load a JPG as as your canvas. You don't want to do that.
It must be possible for you to find following functions from GD library and need to call them in order.
img = imagecreate (width, height);
background = ImageColorAllocate(img, 255, 255, 255);
ImageColorTransparent(img, background);
ImageInterlace(img, false);
Try using _GDIPlus_ as a prefix to above functions. ex: _GDIPlus_imagecreate.
Since this is GDI+, you can easily refer to the documentation and find a way to create an image with transparent background, then draw the fonts. Finally save it to PNG format.
Re: SINHALA and J2ME
Pls help me to do it
Re: SINHALA and J2ME
Great. So it's all in there.
I still think you need to start C# with Visual Studio C# Express Edition (free).
There are lots of examples, tutorials, etc... for these types of work for C#.
Honestly, I don't see any future for you with what you are using for GDI+ work.
I still think you need to start C# with Visual Studio C# Express Edition (free).
There are lots of examples, tutorials, etc... for these types of work for C#.
Honestly, I don't see any future for you with what you are using for GDI+ work.