Screen Mode on more than 8 objects

Post questions on how to use or achieve an effect in Inkscape.
ShawnWDion
Posts: 70
Joined: Fri Apr 22, 2016 8:32 am

Screen Mode on more than 8 objects

Postby ShawnWDion » Fri Jan 20, 2017 2:37 am

Hello everyone hope all of you had a great start to the New Years.

Woke up yesterday with a insane way to mess around with Inkscape and well concept and usefulness in my case is usually over the limits in production.

Here's the issue.

I made some code that takes the colors and splits them as follow for layers

RGB = 0-255,0-255,0-255 or FF FF FF or 1111 1111 1111 1111 1111 1111 in binary well I wanted to get creative in my layers and I did some code that splits the pixels based on the binary digit and stores them as individual pngs using the crappiest settings on Inkscape the screen function works and the original image is reproduced out of the 24 files that end up having colors such as #010000 #020000 #040000 #080000 #100000 #200000 #400000 #800000 and so on for the green and blue.

The bug I'm having on my windows system with 28 gigs of ram I end up losing all the memory available after stacking more than 8 I've tried object mode and layer mode.

Reason why I built this is that when the image is split this way you have no idea on what it is so I'm kinda making a guessing game that stacks on the layers on and off from lowest color to the highest one.

I didn't revert to 0.91 yet to see if this was a new bug or not or if someone had some tricks up their selves to get some better results out of this method.

Best regards

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Screen Mode on more than 8 objects

Postby Moini » Fri Jan 20, 2017 4:17 am

Is this an extension, a script that runs independently of Inkscape, a C++ extension for Inkscape, or did you work on the Inkscape main program code?
Can you explain a bit more what you're doing?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Screen Mode on more than 8 objects

Postby brynn » Fri Jan 20, 2017 10:11 pm

You may wish to reach developers via either mailing list or IRC. https://inkscape.org/en/community/
Sadly, very few developers participate here.

ShawnWDion
Posts: 70
Joined: Fri Apr 22, 2016 8:32 am

Re: Screen Mode on more than 8 objects

Postby ShawnWDion » Sat Jan 21, 2017 2:46 pm

I'll create a smaller sample than my 15 mb file that I'm using. (Stacked png's)

It's not a extension as of yet but it may become one. The problem I'm having is that when you go to layers or objects and I try and make all run under screen mode which blends (Adds the colors together) more than 8 stacked and the system chokes.

But I'll make a example file and get it hosted for you to see and understand what I'm talking about as it's confusing without a demo.

What I'm attempting to do is like cmyk but instead of having color variations on each color, only one color on each of the 24 channels is required to make the full image.

But I'll be honest I wasn't expecting a result answer and your probably right the dev's would probably have a better idea on the bug that is being caused with this type of input file.

If I can pull this off though once fully traced and processed my svg will be extremely light in comparison to a full color trace.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Screen Mode on more than 8 objects

Postby Moini » Sun Jan 22, 2017 2:30 am

Ah. I'm getting real problems from 12 objects on, if they're all stacked above one another with Screen blend mode. Other blend modes have the same issue.

It's a filter, and it's calculation-intensive, thus slow. What happens if you set the filter quality to low in the settings and work in 'no filter' view mode?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

ShawnWDion
Posts: 70
Joined: Fri Apr 22, 2016 8:32 am

Re: Screen Mode on more than 8 objects

Postby ShawnWDion » Sun Jan 22, 2017 6:58 am

Moini thanks for confirming that the setting is power intensive.

I'll figure out why it's causing this issue now that I know it's not just on my PC I'll still upload a example as the technique I am trying to setup might be a improvement phase for svg fonts and secure image hosting.

I'll setup a working demo... btw the difference script on a side note works extremely well with the objects menu and I am also at the point of fixing the trace color correction issue (For some reason it subtracts 1)

Theses test might seem useless but I'm sure someone will find a better use for it.

ShawnWDion
Posts: 70
Joined: Fri Apr 22, 2016 8:32 am

Re: Screen Mode on more than 8 objects

Postby ShawnWDion » Sun Jan 22, 2017 9:51 pm

Here's the example I made it way lighter than what I"m working on.

http://www.mediafire.com/file/p8ahfmv76 ... bjects.svg

Each image will be converted to a trace and then color adjusted to fit the binary color pattern.

I'm just trying to figure out on how to make the object or layer screen mode run smoother to actually put this to good use.

If you take the photo that shows up and split it with arrange with a 5x5 grid you'll see the color splits

ShawnWDion

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Screen Mode on more than 8 objects

Postby Lazur » Sun Jan 22, 2017 10:48 pm

Hi.

There is an issue with the blend filter primitive when applied on the background image that I'm not 100% familiar with yet.
So trying something different. Instead blending into the background image, let's just restrict the blending to the necessary svg elements.
stackedobjects 2
Image filter primitives were used to pull each raster image in and blending in screen mode on them in a chain.

Runs much smoother however there are a few issues with the image filter primitives too.
If you accidentally apply a filter with an image filter primitive linking the same object in, it results in instant crashing without any auto-save.
Also, the image filter primitive uses the top left page corner as an origin, meaning you cannot move any of those pulled in images.
To overcome that you can use cloning -put an embedded raster image on another layer than the clone is at, and for the filter select the clone.

ShawnWDion
Posts: 70
Joined: Fri Apr 22, 2016 8:32 am

Re: Screen Mode on more than 8 objects

Postby ShawnWDion » Sun Jan 22, 2017 10:58 pm

@Lazur

That works perfect for my need, Thank You I just tested with a much larger file and everything is running smooth I seriously could not ask for a better method.

ShawnWDion

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Screen Mode on more than 8 objects

Postby Lazur » Sun Jan 22, 2017 11:01 pm

Glad it works!

ShawnWDion
Posts: 70
Joined: Fri Apr 22, 2016 8:32 am

Re: Screen Mode on more than 8 objects

Postby ShawnWDion » Wed Jan 25, 2017 6:22 am

Related to this issue:

I did the reverse and decided to make a cmyk 4 image under imagemagick using this batch script.

convert ^
in.png -colorspace CMYK^
( -clone 0 -channel MYK -evaluate set 0 ) ^
( -clone 0 -channel CYK -evaluate set 0 ) ^
( -clone 0 -channel CMK -evaluate set 0 ) ^
( -clone 0 -channel CMY -evaluate set 0 ) ^
-delete 0 ^
cmyk_%%03d.png

I added them to my file and what's interesting on cmyk files you have to use multiply or darken but multiply gives a exact match was even more interesting is that I converted the 4 cmyk files into 256 color layers under trace and well I'm dumbfounded the color trace was perfect no changes in color as mix colored images or less colors such as 2 colors white and any other color would give a inaccurate trace. To get to my point the multiply function seems to have more leeway memory wise, I'll try and find in the code where this gets called to compare both modules and I just might be able to submit a suggestion for a fix.

ShawnWDion

Anyways for my binary pattern couldn't ask for a better fix and I'm almost done with the batch script to post it here for anyone who wants to experiment with it.


Return to “Help with using Inkscape”