Jump to content

midora

Members
  • Posts

    1,535
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by midora

  1. 9 minutes ago, paintdxxh said:

    But my issue is that some functions don't even have default assigned hotkeys, for instance flip horizontally doesn't.

     

    ALT-I followed by ALT-H or just for the active layer ALT-L followed by ALT-H.

    Just open a menu using the ALT key and have a look to the underlined characters.

  2. In the save settings of ImPDF you can select to create a page for each layer in the pdf.

    Page 1 = Layer 0

    Page 2 = Layer 1

    ...

    Page n = layer n-1

     

    But maybe your layers always add some elements to the layers below and you like to get the composite up to the layer as a single page.

    Page 1 = Layer 0

    Page 2 = Layer 0 + 1

    ...

    Page n = Layer 0 + 1 + ... + n-1

     

    This maybe a feature for an updated version of ImPDF.

     

     

    • Upvote 1
  3. I like to update the old XCF filetype plugin (GIMP native file format) because it just supports XCF <= v3 and needs an additional exe which converts the xcf to pdn which is then loaded. The current GIMP v2.10.x typically creates v11 or v12 XCF files.  These versions support 16/32bit channels (int or float) and zlib compression.

     

    As an intermediate step I like to improve and extend the PAM filetype plugin. Because it is so easy to write and read. Just perfect for quick tests of the XCF compression.

    PAM allows multiple images in a file but it does not support layers. So I like to extend the format keeping the compatibility to the PAM specification (which is quite old).

     

    I'm adding some code here just to show how easy it is to write a single layer.

    WIDTH, HEIGHT, DEPTH, MAXVAL, and TUPLTYPE are the keywords used in the standard.

    I like to add MAXLAYER, LNAME, LVISIBLE, LMAXOPAC, LOPACITY, and LCOMBINE.

    A layered PAM file will contain MAXLAYER+1 layer images.

    // A PAM file consists of a sequence of one or more PAM images.
    // MO: We may use this to support layers. Layer order in file should be bottom to top.
    // There are no data, delimiters, or padding before, after, or between images.
    // Each PAM image consists of a header followed immediately by a raster.
    // The header begins with the ASCII characters "P7" followed by newline.This is the magic number.
    // The header continues with an arbitrary number of lines of ASCII text.
    // MO: But we may use UTF-8
    // Each line ends with and is delimited by a newline character.
    // Each header line consists of zero or more whitespace-delimited tokens or begins with "#".
    // If it begins with "#" it is a comment and the rest of this specification does not apply to it.
    // The type of header line is identified by its first token, which is 8 characters or less.
    // A line with a first token ENDHDR is the last line in the header.
    // MO: Should we add new TUPLTYPEs BGR and BGR_ALPHA?
    
    // Start of PAM header and a comment
    pamfs.Write(Encoding.UTF8.GetBytes("P7\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("# Generated by xcf2pam\n"));
    // Standard PAM header lines
    pamfs.Write(Encoding.UTF8.GetBytes("WIDTH " + layerPixelWidth + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("HEIGHT " + layePixelHeight + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("DEPTH " + layerChannelCount + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("MAXVAL " + ((1UL << (layerChannelBytesPerPixel * 8)) - 1) + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("TUPLTYPE " + "RGB_ALPHA" + "\n"));
    // Additional Layered PAM header lines
    pamfs.Write(Encoding.UTF8.GetBytes("MAXLAYER " + (layerPointers.Count - 1) + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("LNAME " + layerName + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("LVISIBLE " + (layerProperties.visible ? 1 : 0) + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("LMAXOPAC " + 255 + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("LOPACITY " + (int)(layerProperties.opacity * 255) + "\n"));
    pamfs.Write(Encoding.UTF8.GetBytes("LCOMBINE " + layerProperties.blendMode.ToString().ToUpper() + "\n"));
    // End of header
    pamfs.Write(Encoding.UTF8.GetBytes("ENDHDR\n"));
    // Raster data
    pamfs.Write(layerRaster);

    Feel free to add all kind of comments about this proposed extension of the PAM format (or none ;-).

     

     

     

  4. @otuncelliYou are right. ImXCF used the IsReflexive => true override. I totally forgot about this flag (I had a 5 year break in the developing of paint.net plugins). Returning false shows the same issue as the ZIP and PS plugins. I assume I used IsReflexive => true in the first version of the plugin because there was no load of xcf implemented and never changed it because the preview always looked fine. Maybe I'm updating ImXCF now.

     

    There is now a strong hint that the issue is located in the paint.net application.

     

  5. BTW: Since three months or so I'm fighting with the forum software. I.e. I'm clicking 'Submit reply' the software tells 'saving' but it never returns. Luckily the text is not lost and offered for the next try. Sometimes it takes an hour with several tries until the software accepts the reply. Or today I couldn't upload the image above. I always got the server error 200 (maybe a timeout?) Just now it worked.

    It happens using the latest Firefox and Edge browser but only in this forum. My internet connection is fine.

  6. If the goal is to create the largest possible output centered  on A4 then I would

    - paste the screenshot into a new image

    - Image->Resize the larger edge to 3508 and set the resolution to 300dpi

    - Image->Canvas Size the smaller edge to 2480 (the print size in the dialog should show now 29,7 cm x 21 cm)

    But typically the printer dialog is also able to do the required scaling.

     

  7. You changed your question. So I'm extending my answer 😉
    I would create the image in the proposed size and save it as PDF (ie. via the ImPDF plugin). Because Acrobat Reader has a similar option to print to the whole paper area.

    But at the end the answer depends on the printer.
     

  8. Depends on the resolution. 300dpi 2480 x 3508 pixels.

    Printing depends on size of the non-printable borders of the paper which depend on the printer.

    So you have to reduce the width and height of the image by these margins

    OR

    use the PrintIt plugin which allows you to select the whole paper (Layout->Paper Area->Use whole paper area).

  9. I'm just recovering ImZip filetype and adding new features. During tests I stumbled over a strange issue.

    Assuming an image with a red Background layer and a green Layer2. All Layers are using blendmode=normal and opacity=255.

    If the Background layer is set to invisible then the preview window shows just the checkerboard and not the green composite image.

    The preview shows the green image if the Background layer is set to visible.

     

    If I press save and load the zip later then the green composite is visible.

    Because (as far as i know) the save method uses the load method to create the preview output there shouldn't be a difference between preview and what you get if you are opening the file. I dumped the layers and their attributes just before the save method returns the new document and there was no difference in the values.

     

    1131631995_ImZippreviewissue.thumb.png.d877c1d6b36a5fe997ac6decb7c599a3.png

     

    I tested also with the old plugin version in the ImZip thread and this variant shows the same behavior.

    Any idea if this is a plugin or a paint.net issue? Do I miss something?

     

×
×
  • Create New...