ShowPicture Features

miker1264 · 2814

miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
on: June 02, 2019, 06:13:13 PM
My graphics program called ShowPicture for Icaros Desktop can now Save As Ham6, Save As Ham8, and now Save As PCX. Save PCX is the last of the 24bit conversion routines. Future revisions will allow for more image formats for supported picture types. Currently Save JPG, BMP, TGA, PNM, PCX only save RGB.

On the Colors Menu adding a Color Count might be useful. Before this current release I may include more functionality for the Overlay Mask procedures found on the Overlay Menu that work with the Color Change Operations. I'd like to add some to the Remove Alpha function for Alpha Blending. I may include some Color Quantizing routines, or wait till next release. It depends on the amount of time needed for the new function(s). On the Effects Menu I'd like to include some basic Graphics Effects such as 'Old Canvas', 'Oil Painting', & 'Pencil Sketch' just to show what is possible.

I've always intended to include some PNG Icon menu items to Load, Display, Edit & Save PNG & IFF .Info files. To accomplish saving IFF icons I'll need Quantizing.



salvatore

  • Guest
Reply #1 on: June 03, 2019, 02:46:21 AM
really good man  :D



salvatore

  • Guest
Reply #2 on: June 04, 2019, 03:31:00 PM
it's possible man add the layers fuctions and text(with capable effects, and import existent file), maybe is more work hihi? or not

hi all the best



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #3 on: June 04, 2019, 08:55:04 PM
That's a good question about layers and effects. Also, I hadn't considered adding Text to images like some paint and editing programs can do. That may be useful. Layers are a means of Grouping. As the program advances and more functions are added Grouping will become more important. The Overlay Mask I'm using for Color Change Operations is a type of Layer Mask as used in Photoshop. Though it isn't a binary black and white mask. It's just a white pixel mask used to preserve the underlying pixels from the original image. It works nicely. I'll demonstrate the Overlay Mask soon. It's like HOLD-AND-MODIFY for the entire image. I'm working on a way to convert Photoshop Layer Masks into Overlay Masks. I also plan to include HSL functions and Color Groups. Think of a Color Group as a Harmonious Group of Similar Colors. Using Color Groups with Overlay Masks and Selective Color Change Operations will offer some impressive grahics transformations. Currently Color Changes only consist of Reverse Red and Blue, Red and Green, or Blue and Green. But I'm working on an algorithm called Colorize that wiil change entire Color Groups. I suppose the concept of Layers will play into that as well.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #4 on: June 04, 2019, 09:32:04 PM
If anyone is interested I'm currently working on a means of displaying, editing and saving PNG and IFF icon files. I have been thinking about adding a complete Icon File Menu to ShowPicture but the Menu System is becoming quite large. So I am considering a simple Icon Menu that is loaded on demand when an Icon File is Loaded and Displayed. I have devised a way to display and select Image1 and Image2 though I haven't implemented it yet. Load_Icon_by_DataType is a function that will first split the icon images and save them temporarily to Ram Disk: They will be either PNG images or IFF-ILBM. My Load_Image_by_Datatype will then load each image into a single RGBIcon struct whose members are Count, Width, Height, Depth, UBYTE arrays Data1 and Data2 which will be ARGB pixel data of Image1 and Image2. It will be displayed using WritePixelArrayAlpha. Image1 will be displayed by default. As for Image Selection when the user clicks anhwhere inside the icon display window it toggles Image2 to be displayed from memory. If Image2 is displayed it will toggle Image1, etc. The visual window image selection also sets one of two Menu Toggles for "Normal" and "Selected". The overall effect will be the Illusion of an Icon being Loaded in the window. I hope it works. That would be super cool.



salvatore

  • Guest
Reply #5 on: June 05, 2019, 03:05:24 AM
I have no words on the work you are doing, everything is great, I think it will become a great program, I am supporting a programmer to have a pdf file viewer, only that he is very busy now, this thing stimulates me a lot, I think I also include an editor for simple creation

hi



salvatore

  • Guest
Reply #6 on: June 05, 2019, 03:41:40 AM
I don't know if you could adapt all your work to lunapaint, it already has the implementation of layers and also the support to create animations, and we say in the heart of the users, the source code is available on aros-archives, try to give it a look , could be useful and save you a lot of work ;)



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #7 on: June 05, 2019, 08:18:18 PM
Part of the joy of programming is discovery of new and interesting ways to do things, even if they have been done before. When I try new methods and they actually work as planned that's fun. It's even better when it's all my original code.

Last night I wrote a new function called Load_Icon_by_DatType. I used it as a proof of concept to load 32bit image data from two png icon images and two iff icon images. I stored them in an RGBIcon struct as UBYTE arrays Data1 and Data2. I could then display each image on demand using WritePixelArrayAlpha. The next step will be to attach the Icon Menu to the Icon Display window. So how did I load an ILBM image with 5 bitplanes and display it as 32bit ARGB? I learned a technique early on to read these planar bitmap files that again is very useful with IFF Icon Images. Here is a sample:

if(bitdepth is less than or equal 8 )
bitdepth equals 8;

If(bitdepth equals 8, or bitdepth equals 32
WritePixelArrayAlpha;

That's because I discovered that I can read the pixel data from the Picture DataType Object as anything I want and it will convert it automatically. I don't fully understand how it works but it works. It's Graphics Magic. It worked again last night. That makes programming very satisfying. 😊

When I am planning to include new features such as icon files, layers and masking I try to study and research the topics to gain as much familiarity as possible with the subject. I don't mind during the research phase to take a peek at sample code to get an understanding of how things can be done. Sometimes there are multiple ways to do the same thing. I'll take a look at Luna Paints usage of Layers to see if that's something useful.

I may use another concept called Adaptive Menus for RGB Menus and Icon Menus such as Masking, Layers, and Colors that are only loaded for 24bit, 32bit images and HAM6 or HAM8 loaded as 24bit RGB.

I have been planning to include Color Groups in my program but I had originally only considered selecting one main Color Group for each Color Change Operation. If I expand my concept of Color Groups it may equate to using Layers. There can be one or more Color Groups per image and if each one is assigned to it's own Layer Name then a collection of Color Groups is like a Layer Group. My use of Overlay Masks is similar to Layer Masks as well. The only other features of Layers that may be useful is using Layers to remove backgrounds and that Layers can be turned on and off or be deleted without affecting the others. I'll study Layers and Color Groups some more later.
« Last Edit: June 05, 2019, 08:21:27 PM by miker1264 »



salvatore

  • Guest
Reply #8 on: June 08, 2019, 05:10:35 AM
man is great work ;) enjoy



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #9 on: June 11, 2019, 03:15:17 PM
I have recently in the past two weeks spent about 20 solid programming hours integrating Icon File Support and an Adaptive Menu System for Show Picture. I have also been experimenting with Color Groups, Color Change and Color Shift Operations.

Using HSL Color Space and the 360 Degree Color Wheel I have successfully Shifted a Color Group into a new HSL Color Group by Rotating Each Hue while not changing Saturation and Luminance. For the Color Shift the colors White, Black, Greys, and Alpha are ignored. Only colored pixels in the Main Color Group are shifted to the new Color Group. When I have some time I'll post separately about Color Groups and HSL Color Shift Operations.

Up till now I have been using Overlay Masks (white pixel masks) as a filter to preserve the underlying pixel data during color changes. But it may also be possible to use an Overlay Mask as a Selection to Copy Mask (copy underlying pixels) to a new image at the same pixel coordinates.

If that works then making Composite 24bit and 32bit images is also possible. I'm mostly thinking about icon images. Working with 32bit icons is much easier, but I have thought of a way to modify 8bit images as well by changing the rgb colors in the color map. But how do we redisplay the 8bit image? I am considering using. Picture DataType Object with DST_RAM which I have recently discovered to store the 8bit index values and color map. It is stored in memory. Then use PDTM_ReadPixelArray to Save or Display images.

Many of these things are experimental but it would be great if they all work as expected.



salvatore

  • Guest
Reply #10 on: June 12, 2019, 04:34:17 AM
thanks I don't know much about retouching programs, I think it's a huge job what you're doing and it's very appreciable, as it is appreciable the work of programmers who work at aros

hi :)