- This topic has 14 replies, 2 voices, and was last updated 4 years, 1 month ago by
Koushik Halder.
-
AuthorPosts
-
December 19, 2021 at 4:08 pm #70632
Thanks for the demo.
You should add new item before properties defining, like this:sAlphaHints1.Templates.Add;But I’m not sure your AText parameter has the correct image format.
Maybe you can store it in the TsAlphaImageLsit and load it in the run-time?
Or load from external file?December 19, 2021 at 5:00 pm #70636I am hundred percent sure
AText parameter has the correct image format. I can createTsAlphaImageLsitusingAText parameter. Please see there is something more.December 20, 2021 at 11:44 am #70638Using the same piece of code I can add
sImage1.PictureandsBitBtn1.Glyphso why I am unable to loadsAlphaHints1.Image?
As per you suggestion I have addedsAlphaHints1.Templates.Add;, no my Argument out of range is gone but new error has come as Cannot load image. Invalid or unexpected PNG image format.. So I thinks it can be done with some little bit of modification. So you are requested to help me to modify myLoadAlphaHintsData.
Another thing is that when I am defining a variable asAacHintImage: TacHintImage;and trying to useAsAlphaHints.Templates[TemplatesIndex].AacHintImage.LoadFromStream(LData);instead ofAsAlphaHints.Templates[TemplatesIndex].ImageDefault.LoadFromStream(LData);, I a am getting error atAacHintImageas Undeclared identifier. What is the correct way?FYI : I don’t like to load
sAlphaHints1.ImagefromTsAlphaImageLsitor from from external file run-time.I have updated my project. Please see details.
-
This reply was modified 4 years, 2 months ago by
Koushik Halder.
Attachments:
You must be logged in to view attached files.December 22, 2021 at 6:58 pm #70651I need to know what you want to do, then I can suggest a best way.
I’m not sure that copying of binary data from Dfm is good idea.Type of ImageDefault is TacHintImage.
It’s not the image, this is an object including an image and some other information (look the TacHintImage type in the acAlphaHints.pas unit).December 23, 2021 at 5:58 am #70663My requirement is very simple. I don’t like to allow me like simple user to extract my own
sAlphaHintsTemplateusing PE Editors likePE Explorer,Resource TunerandResource Hackeretc. So I have decided not store any Binary Data to my PE. I will load Binary Data into Memory Stream then I will call it at Runtime. So I need to create to createsAlphaHintsTemplatefrom Memory Stream using Binary Data. So what is the solution of conversion?January 3, 2022 at 7:41 am #70674The ImageDefault.Image property should have Png format for loading.
In the new release I will add support of Bitmaps also (at the nearest days).
Will be possible using of such code:
LoadGlyphData(sAlphaHints1.Templates[0].ImageDefault.Image, 'B6430000424DB6430000000000003600000028000000480000003C....January 3, 2022 at 12:01 pm #70676The above solution is not working. I am getting error as
Cannot load image. Invalid or unexpected PNG image format.January 3, 2022 at 1:18 pm #70680Sorry, you are right, I have added some changes in the package and this Image can load bitmaps on my side.
Your package can load Png only there. Please, wait new release at the nearest days.January 3, 2022 at 7:12 pm #70685No! No! I don’t have no problem with PNG Image. Please modify my project to load PNG image.
January 3, 2022 at 7:36 pm #70686You just need have Png there as a text parameter, pass it in the my demo instead of bitmap text.
January 3, 2022 at 7:56 pm #70687Look the new demo with Png
Attachments:
You must be logged in to view attached files.January 4, 2022 at 7:26 am #70689I have a checked you demo. I have not found PNG Data. I have tried to add Image Data from to code to
Image1: TImage;in DFM File but no image is shown inImage1: TImage;. Please see the case again. I need to load real PNG Data which is available in DFM File.January 8, 2022 at 4:47 pm #70695Binary data is Png there, but you can try bitmap also with v16.22 released today.
January 10, 2022 at 7:25 pm #70703Thanks a lot. Now it is working flawlessly. I have checked using Frame also and working properly.
-
This reply was modified 4 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.