Forum Replies Created
-
AuthorPosts
-
SzakiLaciParticipant'Support' wrote:
Maybe you can give me an example which I can try?
I'll check Graphics32 soon.
Graphics32 is COOL ! 🙂
Yesterday night I've successfully did what I wanted to with it. (Resize nicely)
Solution was here:
http://stackoverflow.com/questions/1976116/scale-an-image-nicely-in-delphi
SzakiLaciParticipantI've found a better solution:
SzakiLaciParticipant'Support' wrote:This option can change an algorithm of resizing and quality is different for different algorithms.
Sorry for the late response. Tried Lanczos3 too. Same ( fuzzy ) results.
Had an interesting phone call today. An other (of your costumer) AC user reported me too:
– had tried to install Graphics32 component pack, and deleted all pictures stored in TImage components for him too.
Can you please try to install Graphics32 too? Put a simple bmp into a simple TImage (NOT TsImage), and see if it's beeing deleted after that.
SAVE your work in a different (ZIPed) location. I usually save the whole borland directory…
SzakiLaciParticipant'Support' wrote:Hi!
You can try not only ftMitchell, but other modes also in the Stretch procedure.
You tried other options?
No, I did not try yet, because wanted to use the BEST quality method. Will try it today and report back.
SzakiLaciParticipant'Support' wrote:Hello
What purpose of this component in your application?
You uses it for converting of images?
I don't really understand, how is it relevant, but …
This form will be a multi-purpose module:
– picture selector / by keyword-search, etc…
– picture-database uploader = DB, downloader = HTTP, syncronizer = HTTP + DB-DB + filesys …!
– editor (before uploading different size/purpose/type files > needs to be “standardized” / categorized)
– should adapt for different size & different resolution. (from 800×480 – to – FULLHD+ )
… attaching some pictures.
SzakiLaciParticipantStill no success 🙁
Tried to install Graphics32 component pack to do the RESIZE part. It Destroyed my whole program by deleting ALL pictures saved in TImages from the *.dfm files 😡
It would be a really really big help, if YOU could write 1 line how to resize a picture nicely using your component ? :wub:
(Theoretically it SHOULD work, because your component shows pictures on top of components very beautifully … so why isn't this working direktly? :
Code:sGraphUtils.Stretch(cutOutBmp, TempBmp, sw, sh, ftMitchell, 2);SzakiLaciParticipantFew things sorted out. (resize)
1. It is NOT recommended to use TsImage.Loadfromfile … (it can not load BMP files ! and many other formats 🙁 )
2. So instead I'm using TSynPicture … for manipulating + converting to BMP >> and Assign the final (resized) picture to a TsImage later.
3. But I still 2 big problems:
3.1 Somehow I loose alpha channel, when I load 32bit PNG and than convert to BMP and stretch it.
– if loaded directly >> no alpha shown
– if loaded with tSynPicture > and Assigned() >> still no sign of transparency
(tried both Transparency property set to True or False)
… I guess because it is still using the inherited methods of a normal TImage.
3.2 I'm using now your AC stretching code:
sGraphUtils.Stretch(cutOutBmp, TempBmp, sw, sh, ftMitchell, 2);
But it becomes FUZZY ! (looks more ugly than a simple Canvas.StretchDraw() )
(See attached 2th picture from close… )
WHY?
[attachment=6939:original.jpg]
[attachment=6940:stretched.png]
SzakiLaciParticipant'SzakiLaci' wrote:Seems for me like Delphi 7 CopyRect is buggy, if trying to work with alpha-channel bitmaps.
.. OR :
maybe copy works fine, BUT when I load the 32bit alpha-channeled Bitmap back to the TsImage >> it can not show ?
(I have red, that TImage can not handle 32bit bitmaps. Can TsImage do that?)
But newer Delphi should be able to handle it… :
So I'm officially confused now :wacko:
SzakiLaciParticipant'Support' wrote:So, you need to compress a small image into Png? It's not possible with acPNG handler.
This was NOT my question!
(I can compress images with 2 different units, like SynGDIPlus mentioned here… So it's working fine.)
My question was:
“How can I copy a part of the original image loaded into TsImage”
______________________
I've tested the problem further, used different units to load the image … (leaving TsImage out)
and realized it works fine, if I define the destination Bitmap as 24bit. The problem starts, if I use pf32bit, or the predefined CreateBmp32(ew, eh); function.
Seems for me like Delphi 7 CopyRect is buggy, if trying to work with alpha-channel bitmaps.
SzakiLaciParticipant'Support' wrote:This image is stored in the ImageList?
Or you want to receive a bitmap which contained in “img1.Picture.Bitmap”?
No, it's not stored anywhere. I'm trying to write a kind of “picture editor/cutter/resizer”.
1. I load a JPG or PNG runtime directly into a TsImage
(Because it can load many types well, and keep 32bit alpha too)
2. Than I set borders to cut (and keep a part of the pic)
3. Than will re-compress as a smaller PNG, and save to a Database.
Thanks !
SzakiLaciParticipant'Support' wrote:Font in menus may be changed, look this topic:
http://www.alphaskins.com/forum/index.php?showtopic=5243
You can try it and play with this feature.
Tried it yesterday.
This works ONLY in skinned mode, and does not increasing the Height. 🙁 So it's useless.
Any other ideas ?
SzakiLaciParticipant'Support' wrote:…ScaleBy is not supported by TMainMenu?
Not really. I'm using a trick (resizing TImagelist) but sometimes it's jumping back to small fonts.
SzakiLaciParticipant'Support' wrote:AlphaControls uses own Png-extractor, which is small, have support of main Png formats and do not required a licensing.
But can't compress and create new Png images.
I know it does.
Anyway I've digged deeper to the licensing, and it seems -as long you do not make changes to the SynGDIPlus code- you can use it in your package 😉
If you do not want > could you please create a compiler directive, so someone can exclude YOUR png unit, and redirect AlphaS. to use SynGDIPlus ?
{$DEFINE USE_SYNGDIPLUS} // instead of own PNG unit
THANKS :a3:
SzakiLaciParticipant'Support' wrote:Hello Laci, sorry for a delay.
Is it possible to make a demo with this issue?
With New beta (9.13 b646) seems to have no problem any more … will test it more in 2 days.
THANKS.
SzakiLaciParticipant'Marv' wrote:Probably the most simple and useful class file I've found for handling PNG, GIF, TIF as well as JPEG on the fly is SynGDIPlus.
…
Thanks for the info !
THIS could be it 🙂 Other libraries, like Vampyre Imaging library, or GraphicsEx are NOT able to SAVE pictures to every format.
But as much as I've red, SynGDIPlus seems to be the one, that can compress images into JPG, PNG formats.
The only problem I have is the license … I do not exactly understand, is it really possible to use in a commercial program for free without sharing the source ?
SzakiLaciParticipantv9.11 >> toolbar problem solved ! That was fast, congrat…
Anyway,
I have found an other strange behaviour about memory consumption :
(Tested with the virt.list. DEMO program downloaded from this site.)
1. if I turn OFF caching = 40.2 MB
2. than I turn it ON >> = 33.7 MB (it drops DOWN ! ???)
3. run the test = 51.4 MB
4. … see 1.)
So basicly it seems like it works the opposite way it should, but the speed test shows other way !
– if I turn OFF cash > nothing should change ! (Already cached pictures should remain in memory)
– if I turn it on > max the first 4 visible pictures should be cached
Why is that ?
SzakiLaciParticipant'TAZ' wrote:Simple. The toolbar has imagelist, hot imagelist and disabled imagelist. Therefore, I have need 3 imagelist which means I need 3 virtualimagelist controls too. That is unless there is a better way to utilize this.
I wrote a long long letter this afternoon, clicked Send … and nothing happened 🙁 web site was off-line. So I've lost it.
The short version:
– Yes, it's a bug. Tested. Serge will probably fix it soon 😀
SzakiLaciParticipant'Support' wrote:Png may be extracted from AlphaImageList only.
Dear Serge,
I still not fully understand, WHY do you use that PNG unit in AC, instead of:
– it is FREE
– can be used to SAVE / convert / reconvert / add info to PNG format
– easy to use
– knows more variants of png compressions (AC can not open some png formats)
– you may choose compression rate/method/speed
– and very WELL documented !!!
Please consider …
Cheers,
Laci
SzakiLaciParticipant:offtopic:
'Support' wrote:You saw topics in the “Installation” part? Maybe your problem has been solved there already?
OMFG … THANKS for the help ! :bravo:
I haven't ever realized there is a pinned INSTALLATION part of the forum. Saw only the Tips and Troublebleshooting topics yet. With this I was able to fix it in 1 minute 😛
(had to add search path to Tools/Environment options/Library/Library too. :18: )
1.) Can you please add this link :
http://www.alphaskins.com/showdoc.php?l=en&n=1
to the install.txt file to your package at the 2th line with:
“
More detailed installation with pictures:
http://www.alphaskins.com/showdoc.php?l=en&n=1
“
…
and also it would be cool, if you could copy ALL Common questions, and typical error msgs to the end of text …
from here:
http://www.alphaskins.com/showdoc.php?l=en&n=2
This had saved me 4 hours 🙁
SzakiLaciParticipant:offtopic:
'Support' wrote:Hello!
I think I have found a reason of the problem and I will fix it in the next release.
Great ! … you where faster than me 🙂
I have too many work now, and sadly could not find the reason why I can not compile with the new release.
Installed into a new directory, and now it does not find the AC… files, even if I add the folder to the search path :a1: )
Spent already 4 hours.
-
AuthorPosts