Jpg image

Hi,
2 questions.

1. I need a jpeg image component that can
a. Read jpg image
b. Write jpg image
c. Allows changes to be made to jpg image

2. Is there any way that i can use fonts that are not installed but present in crrent directory (the directory containing exe file)

Thanks in advance.
LVL 1
m_adilAsked:
Who is Participating?
 
Fatman121898Connect With a Mentor Commented:
Hi M Adil,

On first question:
Listening too, hope somebody will answer.

On second question:

>First you should copy font file in directory where system fonts are placed.
For Windows95/98/NT4 this is :
c:\windows\fonts.
(It seems to me this step is optional, but I've not tried to skip it.)

>Second you should call API function
AddFontResource this way:
AddFontResource('c:\windows\fonts\myfont.ttf').

>Third you should call API function SendMessage this way:
SendMessage(HVND_BROADCAST, WM_FONTCHANGE, 0, 0)
in order to inform other applications for the new font.

Regards,
Jo.
0
 
hubdogCommented:
first question
  I think you can use TJpegImage Class included in delphi.You can search TJpegImage in help ,then you will find the example of how to use it.
  Also you can find another example in
directory \delphi5\help\examples\jpeg

good luck

hubdog
0
 
m_adilAuthor Commented:
Hi,
I've found a bmp->jpg conversion component. Points goes to Fatman for the font reg. problem.
Fatman plz make ur comment as an answer

Thanks!!
0
 
m_adilAuthor Commented:
hubdog TjpegImage class can load (or may be save) jpg image but doesnot allow changes to be made to the image.
0
All Courses

From novice to tech pro — start learning today.