dmitrok2006
Members-
Content Count
15 -
Joined
-
Last visited
Everything posted by dmitrok2006
-
Hello! Need help on this topic. In general, I will describe in more detail. I throw Image1 on the form. Manually (just manually) I load a Png image there, say 600x700, with transparency. Using the code, I need to resize this image loaded in Image1 and then save it to disk in new sizes. The Stretch property doesn't help, because on the contrary, Image1 is adjusted to fit the image and as a result, when saved, Png of the same sizes. I tried Image1.Picture.graphic.setsize, but then a piece of the picture is saved Help. pliz......
-
In any case, thanks for the help. )))
-
Strange... of course... But when I add the saved picture to photoshop, the picture with a white background...
-
Programmerdelphi2k... Wow, such a big code)))) I need a few hours to understand. So I'll write the answer tomorrow, ok? Thank you, you are a good person )
-
There I forgot to write in Var ....
-
Can I email the project for you to fix? Please)
-
Programmerdelphi2k... One more question.... I made this code, but the transparency seems to have disappeared in the saved PNG. Why? var Form1: TForm1; PNGSource: TPicture; PNGTarget: TPicture; PNGresult: TPngImage; implementation {$R *.dfm} uses Unit2; procedure TForm1.a0Click(Sender: TObject); begin PNGSource:= TPicture.Create; PNGTarget:= TPicture.Create; PNGresult:= TPngImage.Create; PNGSource:=form2.Aa.Picture; PNGSource.Graphic.Transparent := True; PNGTarget.Bitmap.Width := Trunc(PNGSource.Width / 4.0); PNGTarget.Bitmap.Height := Trunc(PNGSource.Height / 4.0); PNGTarget.Bitmap.Canvas.StretchDraw(PNGTarget.Bitmap.Canvas.ClipRect, PNGSource.Graphic); PNGresult.Assign(PNGTarget.Bitmap); PNGresult.SaveToFile('c:\1DU\As.png');
-
It's a bit hard to understand, but I'll try. Thank you )))))
-
That is, in the last code at the development stage, the image will be loaded and the file on disk can be deleted?
-
Thank you very much, I'll look into it ))))
-
On Form1 I don't need to put Image1 ?
-
I'm fine with any boot method that doesn't access the disk while the exe file is running... For example, in my project, I manually loaded PNG into Image1....
-
programmerdelphi2k, I want to ask .... Maybe I don't understand something... But the code uses LoadFromFile, and I need to load the image manually, without using LoadFromFile.
-
programmerdelphi2k, thank you very much. I will try. ))))