Page 2 of 2 FirstFirst 12
Results 41 to 54 of 54

Thread: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

  1. #41
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing



    In larger size, adjacent to each other, RC version on the left. It might not seem much of a difference but the deeper shadows change the viewers perception without them knowing it and of course I notice it! You can really see it around the locking pin top left of each widget and underneath the main body and on the cables that connect the speakers.

    The RC one (left) has the advantage of being DPI aware so it looks a lot more crisp. Very nice.

    PS. You will see slight changes to items that have/have no shadows, I am still experimenting.
    Last edited by yereverluvinuncleber; Dec 3rd, 2023 at 11:58 AM.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  2. #42
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    This is the PSD file for reference, with a white background:



    FYI, I can make the shadows much lighter in Photoshop (9%) rather than 27% and then I can make the resulting graphic appear as I want it to using RC. However that involves changing the shadows on every layer of the original PSD, doing some guess work as to how it is going to look, then flattening all the layer sets (groups) to correspond with the program. It take several iterations back and forth to get it right and it is quite a bit of work - that I'd really like to avoid.
    Last edited by yereverluvinuncleber; Dec 3rd, 2023 at 12:17 PM.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  3. #43

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,435

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    Quote Originally Posted by yereverluvinuncleber View Post
    This is the PSD file for reference, with a white background:


    Could you upload the original PSD-File somewhere - (not as *.png-render-output)?
    ...so that I can step through the Parsing-Code, and see where exactly the Parser is "missing some Layer-Info"...

    Olaf

  4. #44
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    Will do, thankyou Olaf, coming by email!
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  5. #45
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    Quote Originally Posted by Schmidt View Post
    the new Code-Zip-Link now contains the cwAlphaImg.cls (as code) directly (so that no dependency to RC6Widgets exists)...
    Thankyou Olaf, that works a treat.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  6. #46

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,435

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    Quote Originally Posted by yereverluvinuncleber View Post
    Will do, thankyou Olaf, coming by email!
    Have just downloaded and checked your PSD,
    but I have absolute identical results in my IrfanView-PSD-viewer,
    compared with the VB6-Output generated by this code:

    Code:
    Private Sub Form_Load()
      Const PSDFile As String = "c:\temp\dieselVolumeMerged.psd"
      
      Dim PSD As cSimplePSD, i As Long, CC As cCairoContext
      Set PSD = New_c.SimplePSD(PSDFile) 'create the PSD-parser-instance (on the given File)
     
      For i = 0 To PSD.LayersCount - 1 'loop over all the Layers in the PSD
          Debug.Print PSD.LayerAlphaPercent(i), PSD.LayerPath(i) 'LayerAlpha-Percentages and Layer-Names
      Next
        
      PSD.AllLayersSurface.WriteContentToPngFile PSDFile & ".png" 'write all "stacked-layers" as a *.png-file
      
      'output of the just written PNG on the VB-Form (ensuring white background)
      Set CC = Cairo.ImageList.AddImage("", PSDFile & ".png").CreateContext
          CC.Operator = CAIRO_OPERATOR_DEST_ATOP 'ensures, that the next drawing-op happens "underneath"
          CC.Paint 1, Cairo.CreateSolidPatternLng(vbWhite) 'add white "underneath" the PNGs Alpha-Channel
      Set Picture = CC.Surface.Picture
    End Sub
    My debug.printed enumeration of the separate "Sub-Layers" in that *.psd -
    does show all SubLayerAlpha-Values at 1 aka 100% (and not 25% for some of them, as you claimed).

    Here is the Parser-generated PNG-Output:





    Olaf
    Last edited by Schmidt; Dec 9th, 2023 at 07:50 AM.

  7. #47
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    Strange, but as you can see the shadow on the two earlier images shown side by side certainly indicate a difference. Much denser shadows. Must be something else that is adding extra shadow, if it is my code then it is doing so unwittingly. It ios not something I have deliberately added. I'll carry on and finish the volume control functionality and if you don't mind, when done, I'll ask you to test the finished program on your desktop and then we can compare.
    Last edited by yereverluvinuncleber; Dec 9th, 2023 at 08:12 AM.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  8. #48

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,435

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    Have now found, what you meant...

    The darker Alpha-Blur is not happening whilst "parsing out the SubLayer-Images" of the PSD... these work just fine...
    it is generated when these SubLayer-Images are rendered from "within a Widget" (on a non-deep-cleared BackGround).

    We had this topic already in another thread (RC6 does no deep "Auto-Clearance" on its own anymore, due to performance-optimizations compared to RC5).

    So, your "workhorse-widget" (cwAlphaImg.cls, which you now have as source-code) -
    needs the same update in its Paint-Event as the "Blend-Animation-fix" in the other thread:
    Code:
    Private Sub W_Paint(CC As RC6.cCairoContext, ByVal xAbs As Single, ByVal  yAbs As Single, ByVal dx_Aligned As Single, ByVal dy_Aligned As Single,  UserObj As Object)
      CC.Operator = CAIRO_OPERATOR_CLEAR
      CC.Paint
      CC.Operator = CAIRO_OPERATOR_OVER
      
      Dim Srf As cCairoSurface
      If Cairo.ImageList.Exists(W.ImageKey) Then Set Srf = Cairo.ImageList(W.ImageKey) Else Exit Sub
     
      CC.RenderSurfaceContent Srf, 0, 0, W.Width, W.Height, ,  W.AlphaInherited 'render the current W.ImageKey-Surface (as loaded  priorily into the ImageList)
    
      If W.MouseOver And W.HoverColor <> -1 Then 'render a colored,  slightly blurred copy of the Srf with 25% Alpha (in case of being  hovered)
         CC.RenderSurfaceContent Srf.GaussianBlur(0.1, , True, W.HoverColor), 0, 0, W.Width, W.Height, , W.Tag * W.AlphaInherited
      End If
    End Sub
    Olaf

  9. #49
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    That does it, perfectly.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  10. #50
    Addicted Member
    Join Date
    Feb 2022
    Posts
    217

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    I'm sure Olaf is way ahead of me, but it must be the way the alpha Channel processes transparencies...?

  11. #51
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    We have it sorted now. Three missing Cairo commands required for RC6. I just have to ensure they are replicated within the W_PAINT functions.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  12. #52
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    Olaf, will it be possible some time to implement the Simple PSD parser into RC5 as well? I'd like to eventually back port my desktop widgets to run on XP and ReactOS. I have a few basic RC5 widgets that use just a single image or two and those will probably operate well on XP/ReactOS - I'm going to test soon - but the more complex programs whose graphics are rooted in a PSD file, won't run on XP and probably won't run on ReactOS for a while yet, until they have an NT6 compatible version.
    Last edited by yereverluvinuncleber; Jan 15th, 2025 at 11:37 AM.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  13. #53
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,040

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    psdParse and export PNG. Can this function be compiled into a small DLL by itself? Maybe only 500 kb.Do a 64-bit, 32-bit can be used.

    Many excellent things would be better if they could be made into independent components. Like nuget. Exe, NPM. Exe.

    We can package a complete DLL, or download multiple DLLs at a time, or make some functions into a separate ddll.

    psd image Is the format a vector diagram? Maybe it can be enlarged arbitrarily without blurring.

    If the picture is only in pixel format, it cannot be vector enlarged.
    The simplest way is to convert it into multiple transparent PNG images.
    Winxp, Linux, mac, all have different ways to show the effect of animation.
    Last edited by xiaoyao; Jan 26th, 2025 at 07:16 PM.

  14. #54
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,923

    Re: VB6 + RC6 Auto-generated Widget-Forms via direct PSD-FileParsing

    Just a gentle BUMP for Olaf to read and hopefully respond to my last query
    Olaf, will it be possible some time to implement the Simple PSD parser into RC5 as well? I'd like to eventually back port my desktop widgets to run on XP and ReactOS. I have a few basic RC5 widgets that use just a single image or two and those will probably operate well on XP/ReactOS - I'm going to test soon - but the more complex programs whose graphics are rooted in a PSD file, won't run on XP and probably won't run on ReactOS for a while yet, until they have an NT6 compatible version.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width