?
Solved

Loading strings into images/bitmaps

Posted on 1998-06-03
11
Medium Priority
?
230 Views
Last Modified: 2013-12-02
Hi,

I want to read a textfile into a bitmap. How can I best do this?

Thanks
0
Comment
Question by:lizzzard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 2

Expert Comment

by:ysd
ID: 1350099
You can try drawing the textfile into the bitmap on runtime..if you run the example that is available on the help file of Delphi 3 under "SaveToStream", you will see that it draws the contents of "P" which is a variable of type TByteArray I think, on the Bitmap, and you can also define using the 'FOR Loops' the Y/X position.   You can also check the drawing bitmap OffScreen....

I hope I've been of some help.

YSD
0
 

Expert Comment

by:heapster
ID: 1350100
Why? (Out of interest).  
0
 
LVL 1

Expert Comment

by:Greedy
ID: 1350101
Must be some sort of new bitmap encryption??
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:lizzzard
ID: 1350102
I want to make a screensaver that randomly gets text out of a textfile and puts it on the screen,move it around a bit and so on. Or do you know a better way do to this?
0
 
LVL 1

Expert Comment

by:Greedy
ID: 1350103
oh, you mean to draw the text that is in the file so the graphic looks like the letters?  Say they had "TEST" in the file so you want the graphic to look like a little floating image that said TEST...Window 95 and NT have an open GL screen saver called 3D Text that does this.  If this is waht you want I can give you some help on reading in the file and rendering a graphic of it for display.
0
 

Author Comment

by:lizzzard
ID: 1350104
Yes,that's what I want. The main idea is that there's a textfile with 'famous one-liners'. The screensaver must randomly pick a line (which is ofcourse not the problem) and then let it loose on the screen using some background.
Thanks for your help.
0
 

Expert Comment

by:heapster
ID: 1350105
Bitmap.Canvas.TextOut(X, Y, 'This is my text');      ?
0
 
LVL 1

Accepted Solution

by:
michaue earned 100 total points
ID: 1350106
Why don't you just create an image with paintbrush for all the letters of the alphabet, that way you can put in your own cool letter designs and then draw them on the screen as you read each letter from the file or something like that

That way can also put cool sounds, like a gun shot etc. after each image(letter) is displayed ...

Have fun  Elfrieda
0
 

Author Comment

by:lizzzard
ID: 1350107
Thanks for you suggestion michaue,but don't you think the exe will grow too large then? It is supposed to be a screensaver. I want it to be under 200k

Regards,Alex
0
 
LVL 1

Expert Comment

by:michaue
ID: 1350108
I suppose that depends on your images ...
Otherwise you can down a very nice font from the internet and use that to write to the screen in the normal way (with a large font size) or maybe you can make it a bit more fun by using several different fonts and displaying each letter in a new font, colour and size ...

Hope it works ...

Can you send me a copy when finished, it sounds interesting
0
 
LVL 1

Expert Comment

by:michaue
ID: 1350109
I still want a copy if you're finished ... of course if you don't mind.


Elfrieda :)

elfrieda@ats.sani.org
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question