Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by midora

  1. That's a little bit strange because the Windows FileExplorer shows it like the third image. And I guess the the FileExplorer uses also WIC. Maybe icm is not enabled. paint.net 4.2.16 and the 4.3 beta shows it like the second one, which seems to be fine. And the What's it plugin identifies it as jpeg 😉


    I have to correct the first sentence. It only gets the green touch on my second monitor on the main one it looks fine.

  2. By mistake I figured out that the rule 'paint.net does only load an image if the image filename has the correct extension' is not always true.


    Renaming a .jpg to .bmp still loads the file. I guess this is the case because both extension use WIC to decode the file and WIC identifies the file by content and not by extension.


    We will not tell this users 😉


  3. You missed the point that women should stay at home and shouldn't get any education.


    There are good reasons why most countries removed god from their constitutions and tell religion is something private which is protected.


    I don't know how the situation is outside of Switzerland but here exist two types of marriage. One by the state and one by the religion. The one by the state is just about that two decide that they share responsibility for each other. The religions can decide if they are accepting mixed couples. My one does and also allows women to be priest. I guess it's the same in other European countries.


    Still if all countries would share the same basic measurement units then life would be easier. Who cares if there are local additions.



  4. Cultural identity is an important thing to keep local people together but it also creates borders to others. So IMHO we have to think about what's really important and not just something we are used to.


    On 9/18/2021 at 5:21 AM, IHaveNoName said:

    Incredibly those imperial measurements units are understood even by millennials and post millennials


    But if something is part of your daily life then this is not a big surprise.

    You would also adjust if the signs would shown km for a period of 40 years.

    Is a mile a natural distance between anything? If not then there is no difference to km.


    Just yesterday there was a message about a new TV from LG. The size is 325 inches. I can not imagine this amount of inches.


    There are no EU overloards. There is a union of countries which share common values, try to solve issues peacefully, and show solidarity.


  5. 1 hour ago, Red ochre said:

    The E.U. must be a terrible place now judging by the number of migrants trying to escape across the English channel.☹️


    They are coming because their English is better than mine ,-)

    Yeah, it's sometimes a disadvantage to be the homeland of a language which people are using worldwide. Not like German or French.

    Still you should be happy that there is the French channel.


    In Swizerland we are using Deziliter (tenth of a liter) to measure bear. Everything is small.


    At the end let's see what the UK goverment decides. And as I remember it was not forbidden to add imperial units but a must to use metric. Which make sense in a global world. So maybe it will be now vice versa.


    And for sure i noticed the death Sir Sinclair (independent of my potential programming skills, others have to  judge this ;-).

    So RIP Clive.

    But I'm much more interested to see what's going on in the future and not in the past.


    'Evil empire E.U.' that's really funny. That's worth an up-vote.


    • Haha 1
  6. 1 hour ago, Tito said:

    I use the rotate and zoom tool on layers, but it's really hard to use it with trackballs. It's too imprecise to do a flip on an image


    Typically it's easier to use the numeric controls to fine-tune the effect. But as @Pixeymentioned sometimes it's better to use a perspective plugin (depending on the effect you like to achieve).

  7. New tools, new challenges, more fun 😉

    I remember when I first had to use this machine to create holes on cards to program the computer on university. Just 40 years have been passed and nowadays we are fighting with gigabits of data per second in mobile communication and still trying to debug and understand what's going on there.

  8. As @null54said. It looks like that you placed your whole project inside of the paint.net folder.

    You should locate it somewhere outside of paint.net folders and just copy the plugin dll from the output folder to the Effect folder using a post-build command.

    It's standard that VS copies your dll and all dependencies and .pdb into the output folder.



    • Thanks 1
  9. No complains about unsafe code in plugins? 😉


    I put the code in an extension method for Surfaces.



            public unsafe static void FromRasterBGRA(this Surface surface, byte[] rasterBGRA)
                int width = surface.Width;
                int height = surface.Height;
                fixed (byte* rasterPtr = rasterBGRA)
                    int row = 0;
                    long srcStride = width * 4;
                    var srcPtr = rasterPtr;
                    var srcRasterEndPtr = srcPtr + srcStride * height;
                    while (srcPtr < srcRasterEndPtr)
                        var dstPtr = surface.GetRowPointerUnchecked(row);
                        System.Buffer.MemoryCopy(srcPtr, dstPtr, srcStride, srcStride);
                        srcPtr += srcStride;



    Pointer operations are fast compared to for loops. If the stride is small then they are beating method calls because of the overhead.

    Sometimes your raster is not in BGRA order. This can be handled easily using pointers.


    Still I would like to avoid unsafe code at this level.

    So surface methods to copy from/to part of a row would be great. I.e.


    void CopyToRow(byte[] src, long srcOffset, int row, int column, int length);

    void CopyFromRow(byte[] dst, long dstOffset, int row, int column, int length);


    void CopyToRow(uint[] src, long srcOffset, int row, int column, int columns);

    void CopyFromRow(uin[] dst, long dstOffset, int row, int column, int columns);


    or for a whole raster


    void CopyToImage(byte[] src, int srcStride);

    void CopyFromImage(byte[] dst, int dstStride);


    void CopyToImage(uint[] src, int srcStride);

    void CopyFromImage(uint[] dst, int dstStride);


    Sorry that I have to use spoilers instead of code sections but I'm tired to wait that it opens here (and most of the time it fails).


  10. Assuming there is a pixel array containing all pixels of the image in BGRA top-left to bottom-right order. There are many surface methods (let's exclude the obsolete one) which may be helpful. So what's the proposed way for filetype plugins.


    Is unsafe code acceptable (like the following).



            unsafe void SurfaceFromRasterBGRA(Surface surface, byte[] rasterBGRA)
                int width = surface.Width;
                int height = surface.Height;
                fixed (byte* rasterPtr = rasterBGRA)
                    int row = 0;
                    var srcPtr = (uint*)rasterPtr;
                    var srcRastercEndPtr = srcPtr + width * height;
                    while (srcPtr < srcRastercEndPtr)
                        var srcRowEndPtr = srcPtr + width;
                        var dstPtr = (uint*)surface.GetRowPointerUnchecked(row);
                        while (srcPtr < srcRowEndPtr)
                            *dstPtr++ = *srcPtr++;



    is the surface data locked during the operation or is there the potential risk of a crash.


    I would prefer to use a paint.net method to copy from/to a raster but I didn't find a good method.





  11. Thanks for the effort @null54. I just found the topic about the Treatment. Then I looked for Treatment in the registry and found

        Key: Treatment Value: 2  (means Photo Border)

    Then I checked the .pdn entry and found

        Key: PerceivedType Value: image

    And that's it. Setting this key to .bmrl shows the drop shadow after a restart of the FileExplorer.

    That's what I expected in the beginning: There must be a kind of file category marker.

    Now I have to figure out how do do this using the sharpshell library. Maybe I have to patch it...


  12. Maybe the issue is related to this comment:


    An implementation of this interface for photo thumbnails is supplied in Microsoft Windows as CLSID_PhotoThumbnailProvider. Applications that use the supplied implementation must define a constant CLSID identifier using the GUID {C7657C4A-9F68-40fa-A4DF-96BC08EB3551}.



  13. We know the documentation of these COM interfaces is limited. .NET 4.0 is needed to implement the interfaces in c#.

    I didn't expect that a lot of people are experienced with this. But you never know.


    The handler uses COM IThumbnailProvider and returns BGRA (or you couldn't see through 😉

    No idea what's going on there. Just the standard image format thumbnails are showing the shadow AND .pdn.

    It's for sure not important but I really like to understand what's going on.

    In the moment the code for .bmrl draws the image a little bit higher into the bitmap just to reduce the missing shadow offset effect.

    This way the top line of the images in all the thumbnails is adjusted (otherwise the .bmrl thumbnails would sit a bit deeper).

    This seems to work for all thumbnail sizes.


    In the moment I'm creating a InfoTipHandler to show some properties of .bmrl files.


    Maybe paint.net could add one to show the dimensions of the image.


  14.  Sorry the ReadMe file in the shellextensions zip was empty. Which makes it a bit difficult to install the dlls 😞


    So here is a new zip WITH installation guide.




    Before installation (.bmrl already assigned to open with paint.net)




    After installation



    .bmps containing athe BMRL format are showing RL in the top left corners. And .bmrl files the image plus the associated application.


    • Like 1
  15. The files with extension .bmp and .bmrl are using my new shell extension to create the thumbnails.

    The 'DropShadow bmrl.bmp' file ist just a renamed copy of the 'DropShadow.bmrl' which I saved from paint.net with the bmrl filetype plugin.

    This 'DropShadow bmrl.bmp' is just to show that thumbnails for files with .bmp extension but .bmrl content are showing now a thumbnail. This is not the case without the shell extension for .bmp because Windos detects these .bmp not as bitmap files.



    Same effect in Windows light mode.

    So the question is, how does Windows know that .pdn should get a drop shadow but not .bmrl (latest Windows 10).


  16. I'm wondering why the thumbnail of a .pdn file shows a drop shadow in FileExplorer icon views (or the preview panel).

    Typically just .bmps are showing the drop shadow and no other file types (on my Windows 10 laptop).

    Any idea/hint why this is the case for .pdn files? I would like to get it for .bmrl.

    I can not imagine that the drop shadow is part of the thumbnail. Because it uses exact the same colors as .bmps in dark and light mode.

    Does it depend on the type of registration?


  • Create New...