Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Mon Dec 02, 2024 4:52 pm
All times are UTC + 0
Image Shaper
Moderators: Community Tools Developpers
Post new topic   Reply to topic Page 2 of 3 [129 Posts] Mark the topic unread ::  View previous topic :: View next topic
Goto page: Previous 1, 2, 3 Next
Author Message
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Fri Dec 15, 2017 1:29 am    Post subject: Reply with quote  Mark this post and the followings unread

If you can find a file that has the first byte of the header not 0 then i will try to look into it.
My theory is it might have been a type specification could also had been global shape flags, as these are things Westwood did previously.

That said i don't have any files to show this or found the code that reads this byte at all, it's also worth noting it might not be a byte but a word.

As for the forth byte in AverageColor, its probably padding.

Oh yea also note on AverageColor generation, it's essentially just what you get when you do Average in any image editor, but there is one difference, you need to discard the 0x0 index pixels, it averages the nontransparent pixels only, while in image editors even if you make the background transparent internally it will still fill it with white or black and then average it.
Don't quote me on this that it should be like this but as far as code goes on a quick google after a few pages i found https://www.compuphase.com/graphic/scale3.htm which seems to be a sane way to go about it. Ill have to look into it tomorrow myself see if i can find anything like that in shapeset.

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Dec 16, 2017 5:15 am    Post subject: Reply with quote  Mark this post and the followings unread

Is the image processing (worker threads) necessary before making SHP
if there are images in only one column? Are these processing only for
combining images or these do something before making SHP?

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Dec 16, 2017 12:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

they are necessary for the time consuming color conversion.
The Euclidean calculation may be fast for one color, but it still needs to find for every single pixel in the image the corresponding palette color.
And for this there is the slow
for x=0 to bitmap.width
for y=0 to bitmap.height
{
getPalettePixelColor(x,y)
}
function necessary.

Each row is an image conversion (and combining) job, and the number row-jobs are equally split among the threads.
You can see the result of the row-jobs if you enable the temp image output, as then the threads save the converted image in the palette indexed file.


The converted (and combined) images are collected (thus the big memory usage after conversion) and then saved as SHP in the main thread, which is the only time the interface freezes, as i didn't want to put this in separate thread as well.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Dec 16, 2017 12:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

OK fine.

Back to top
View user's profile Send private message
deathreaperz
Commander


Joined: 20 May 2013
Location: Indonesia

PostPosted: Sun Dec 17, 2017 3:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Index was outside the bounds of the array.

I got this while combining Images. Any clues on how to fix this?

_________________
Quote:
Humans were born for two things: to pray and be productive.


Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Dec 17, 2017 9:54 am    Post subject: Reply with quote  Mark this post and the followings unread

i need more infos than that.
-program version
-which images do you used? (size, color format etc) Best upload them so i can recreate the issue
-how many images
-at which point do you got the message (during image processing? while shp saving?)
...

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Dec 22, 2017 1:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

new version uploaded

Version 01.01.00.07
-(bugfix) loading palette indexed images was not supported. Now loaded directly without any color conversion.
-(bugfix) SHP frames loaded in the 2nd or 3rd imagelist caused an exception
-(update) images with 32bpp ARGB, 24bpp RGB and 8bpp palette indexed color formats are directly supported. All other image color formats are converted to 32bpp ARGB before processing image in color conversion.
-(update) added options to optimize canvas size
-(update) BitFlags added
-(update) option to calculate average radar color added (ignoring all transparent background pixel)
-(update) Routine to identify SHPs changed to be less strict. Previously anything with a BitFlag value of >3 was discarded as invalid SHP.

@deathreaperz
No clue if your problem is fixed with this update. I didn't had my crystal ball at hand to see what went wrong in your case.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Dec 22, 2017 4:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

The average color should be checked on by default, as we don't know
what else it is used for apart from radar color. Also its last used status is
not saved.

The optimize canvas checkbox should be unchecked by default and when
making it checked, by default the keep center should be checked. Let the
user uncheck the keep center checkbox manually.

Have you checked if the resultant SHP is not affecting position in game
relative to its selection box? It should be safe in all conditions like a
structure would be having more than a single shp like buildup, animations
to accompany the main structure, this option shouldn't result in having
SHPs rendering at different alignment.

Back to top
View user's profile Send private message
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Sat Dec 23, 2017 12:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:

Have you checked if the resultant SHP is not affecting position in game
relative to its selection box? It should be safe in all conditions like a
structure would be having more than a single shp like buildup, animations
to accompany the main structure, this option shouldn't result in having
SHPs rendering at different alignment.


I think you realise the app merely adjusts according to provided art and force its dimension to smallest possible will not work with separate same building shps despite keeping center at the moment when processing singular shps. As is, canvas optimization is more for the pros at this point than average joe that may not realise the potential inconsistencies.

Buildings wise this would need possibility of inserting all building shps in and then use them together for the measurement but still split like originals were, else you'd be forced to split them yourself afterwards. Adding all in single list now seems not to apply the canvas optimization in my test when giving multiple shps despite makes common shp.

Also some minor bug, i tried dragging shps into the image lists and 3rd image list would not put at the first frame (put a lot of blank frames instead first) when dragging shp in unless you  use the load function(?)

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Dec 23, 2017 1:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

The canvas crop feature could be dropped altogether as it won't make
much difference when using compression in SHP. Or it could be made
available in some expert mode. For now it could be kept unchecked
by default.

Drag and drop on the first empty row of the column that you desire.
It works for first row of 3rd column as well.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Dec 23, 2017 4:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

D&D always checks where exactly you drop. Only if there are no rows present, it starts inserting the images from top.

This is because the tool can combine images, where you might want to combine images 64-96 with something, so you would drop your additional 32 images on the 64th cell, not the first cell.
Same is true with load images, which also checks the cell location where you right clicked and inserts the images in the that column starting from that row.


It could be that "opt. canvas" alone (keep centered unchecked) is not keeping the image at the correct place ingame.
I have to do some more tests with optimize canvas and check how ShapeSet optimized the canvas.

However, with "keep centered" checked, it works as it should and optimizes the canvas fine.


\Edit
opt. canvas with "keep centered" off works the same as ShapeSet.
however if the colored pixel where off center yet correct positioned ingame, they get misaligned due to the canvas optimization.

In ShapeSet, WW used a simple rectangle drawn on the first frame to set the canvas. The same could be done in Image Shaper if you have "keep centered" off.

Attached is a sketch showing the canvas optimization methods.
In the 3rd case the image gets misaligned, since it lost its relative position to the center as offset is set to 0,0.

Note: when the SHP is saved, each frame has it's own minimal sized canvas set. In the example the SHP would store only data for the 18x24 big image.



SHPcanvas_optimization.png
 Description:
 Filesize:  3.2 KB
 Viewed:  21848 Time(s)

SHPcanvas_optimization.png



_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Dec 23, 2017 5:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you did test with a single SHP case like infantry, then could try like
a turreted building where the base, buildup, turret and its anim have
different non transparent dimensions.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Dec 23, 2017 6:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

should work fine if you select opt. canvas and keep centered
-you should only make sure buildup and base have same dimensions
-turret and anims can have different dimensions
as long as they all are kept centered, there isn't a problem in minimizing the canvas

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Dec 25, 2017 10:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

new version uploaded
next to some new functions, this one has a few optimizations in the interface to speed up the work with the tool. Mainly you don't have to right click selected files anymore to set the frame specific settings like radar color.

Version 01.01.00.08
-(bugfix) optimize canvas failed when empty frames were included
-(bugfix) when using "RLE_Zero" compression, the bitflag wasn't set in the SHP
-(update) last used average color checkbox value stored in ini
-(update) when enabling "optimize canvas", "keep centered" is enabled by default as well
-(update) option added to use a custom color as transparent background color during color conversion
-(update) option added to copy only the transparent pixel when combining this image with a base image
-(update) changes in the "Image/Frame Settings" are instantly applied to the selected images/frames


"combine transparent pixel"
this option is for those who use different render passes, where one is some kind of mask, with the mask defining the area that should be kept and all other pixel set transparent.
e.g.
you have 2 render passes, one with heavy blur anti-aliasing into the background, one without anti-aliasing and sharp borders.
-load in ImageList 1 the anti-aliased blurred images which alone would give a dark outline during conversion
-load in ImageList 2 the sharp aliased images and set on these "combine transparent pixel"

Now the transparent pixel of the mask are copied onto the blurred image.
This way you can remove the dark outline, while keeping the blurred or anti-aliased inner part.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
pchote
Rocket Infantry


Joined: 06 Feb 2015

PostPosted: Fri Dec 29, 2017 3:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blade wrote:
I wasn't trying to force your hand or anything, most people won't even be interested in the code in this community and its not like the OpenRA team or even Olaf are really likely to pursue the matter and they are the only ones who would have standing to do anything about enforcing the GPL on you. As it is, if I can't rebuild the entire tool, a bit of the source isn't exactly useful.

You should be careful about incorporating open source code in your tools if you don't intend to play by the open source rules though, the GPL requires you make the entire source available for a binary you distribute that contains some GPL code, not just the bit of GPL code you happen to use.

I personally think its just the right thing to do to open source tools for modding. I am aware that I have released tools myself without source because they were based on code I couldn't just okay the release of on my own, but if I could have I would.
I'd like to second this.  It's awesome that people want to build stuff based on OpenRA, but it is only fair and is a condition of the license that you don't restrict that same right from others.
The GPL doesn't force you to post the code publically, but it does require you to give all the code that makes up the binary to anyone who asks for it.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jan 11, 2018 8:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

new version uploaded
Version 01.01.00.09
-(update) create images expanded with SHP(TS) file format, allowing each frame to be saved as SHP
-(update) create images filename can now use an asterisk *, to keep the original filename for the single frame

This basically allows to convert single images into single frame SHPs, like a batch process.


@pchote:
The source for the SHP creating routine is uploaded on the previous page.
If someone wants the complete program source code, he can write me a PM and i'll send it.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Jan 12, 2018 8:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Haven't tried the new release yet, but the source-request-by-PM sounds fair to me already. GJ LKO regardless, tool's useful.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Nolt
Cyborg Firebomber


Joined: 25 Apr 2012
Location: Chile

PostPosted: Fri Jan 19, 2018 2:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Hm, I ran into a big issue when trying to import a construction yard I am doing into the shp builder, assume 700 frames, 320x240 each, the SHP builder was simply incapable of importing such amount of files, freezing it for more than 20 minutes, by then I just had to kill the process, on the other hand, your program takes little to no time. Thanks man, at a first glance, it seems to work great.

_________________

Creator of Shattered Paradise .
ORA Discord https://discordapp.com/invite/tuhp9m6 , SP Discord https://discord.gg/hk428Wk

Back to top
View user's profile Send private message Send e-mail Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Jan 19, 2018 12:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

glad to hear it works as it should Smile

Though 20 min for SHP Builder isn't unusual. After an hour i would have said it stopped working, but the import in SHP Builder can really take that long. It's also normal for SHP Builder that the interface freezes, but it still works in the background.
When it crashes due to too many frames/memory usage it'll usually throw an exception.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Nolt
Cyborg Firebomber


Joined: 25 Apr 2012
Location: Chile

PostPosted: Fri Jan 19, 2018 3:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

I noticed something, when loading images, the program takes more time to display the image list on the main window than loading the rest of the images. (Think, the frame had 29 frames while the the whole list was had 682 files)

Another thing, a request, did you ever thought of adding an option to process all the frames after an x number as shadow frames (All pixels asigned to a single color)?

The most logical option would be to render the second half of the frame list, but please dont do that, ORA allows more flexibility on where you can put the shadows.

_________________

Creator of Shattered Paradise .
ORA Discord https://discordapp.com/invite/tuhp9m6 , SP Discord https://discord.gg/hk428Wk

Back to top
View user's profile Send private message Send e-mail Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Jan 19, 2018 3:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nolt wrote:
I noticed something, when loading images, the program takes more time to display the image list on the main window than loading the rest of the images.

I noticed that too, that when populating the onscreen list, it seems to take
a little longer as if it is refreshing the viewable list on adding every list item.
When it starts loading the offscreen list it goes fast. It started happening
only with v01.01.00.06 onwards. But the delay is negligible.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Jan 19, 2018 3:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nolt wrote:
Another thing, a request, did you ever thought of adding an option to process all the frames after an x number as shadow frames (All pixels asigned to a single color)?

The most logical option would be to render the second half of the frame list, but please dont do that, ORA allows more flexibility on where you can put the shadows.

a) yes, but deliberately not implemented any automatism, because it's just a few clicks to assign the shadow frames their own customized palette
and an automatism could work wrong in several cases (e.g. explosion anims without shadows).

I might add a way to apply the custom shadow palette a bit faster, removing some repetitive steps.

b) nah, wouldn't have done this in such a imprecise way anyway, due to issues mentioned in a)


c) i'll see what i can do about the image loading performance issue

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Thu Jan 25, 2018 9:16 am    Post subject: Reply with quote  Mark this post and the followings unread

It saves time!

_________________

Back to top
View user's profile Send private message Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Tue Feb 06, 2018 12:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Fail to convert



unittem_greenremap.pal
 Description:

Download
 Filename:  unittem_greenremap.pal
 Filesize:  768 Bytes
 Downloaded:  16 Time(s)


mk.zip
 Description:

Download
 Filename:  mk.zip
 Filesize:  111.14 KB
 Downloaded:  21 Time(s)


_________________

Back to top
View user's profile Send private message Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Feb 06, 2018 1:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

A single pixel on any row in the last frame (c 0039.png) is causing problem
with the RLE_0 implementation in this tool. Uncompressed works fine. Also
SHP Builder works fine.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Feb 06, 2018 10:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

new version uploaded

Version 01.01.00.10
-(bugfix) RLE-Zero encoding algorithm crashed when the encoded result data was bigger than 2 times the uncompressed data (RLE encoded worst-case is 3 times the size as uncompressed)
-(bugfix) imported files ignored the "fixed Backcolor" setting
-(update) faster file import in datagridview (now refreshes only once after import is complete)


The problem was the RLE_Zero encoder.
In SHP Builder it constantly raises the byte-array size while it creates the encoded data.
Since arrays in C# need several performance heavy steps to be resized and i didn't want to use the slower List, i simply had the byte-array for the RLE-result preallocated and scaled 2 times the size as the uncompressed byte-array, thinking it would be sufficient.
Unfortunately the worst case for RLE-Zero compressed data can make it 3 times the size as the uncompressed data, in case of a single pixel.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Feb 07, 2018 12:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Could have put refresh after loading 500 or 1000 images. Loading 64k
images works but in the meantime it shows the application as Not
Responding and the grid view area is blank.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Mar 21, 2018 8:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

new version uploaded

Version 01.01.00.11
-(update) JASC Palette format supported
-(update) loading files now done in a separate thread to prevent/reduce freezing interface
-(bugfix) when loading multiple SHPs, an empty cell was added after each SHPs last frame

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri May 11, 2018 5:24 am    Post subject: Reply with quote  Mark this post and the followings unread

For weapon muzzle anim the Start/End= trick doesn't work and I have to separate the file into 32 directions which it's kind of boring and dull to do.
So can you add the following feature or equivalence:
Combine every N frames into one file. For example if I have 960 frames and set N=30, then I get 32 shps with 30 frames.

_________________

Back to top
View user's profile Send private message Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri May 11, 2018 1:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

hmm, good suggestion
i'll see what i can do.

\Edit
new version uploaded

Version 01.01.00.12
-(update) if preview window is focused, ctrl+c copies the image into the clipboard
-(update) Split result added, which allows to split the frames evenly into multiple SHPs.


Note: haven't made it with a split every n-th frame, since this would be a bit more inconvenient in the interface, as it needs an additional checkbox to turn it on/off
or
the user would always have to make sure the entered number is high enough when creating single SHPs (which is quite the norm).

Right now the default is 1, and only when you want to split it up you raise the value to the number of files that you want.
In your case you use 32.

Note: leftover frames from the division without remainders are skipped.
e.g.
10 frames divided into 6 files would result into 6 files with 1 frame each and 4 frames being skipped.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Sat May 12, 2018 3:55 am    Post subject: Reply with quote  Mark this post and the followings unread

Good enough Smile

_________________

Back to top
View user's profile Send private message Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Mon Jun 18, 2018 9:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Suggestion: append X empty frames to the end
Useful for infantry which has as many empty shadow frames as non shadow frames

_________________

Back to top
View user's profile Send private message Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jun 18, 2018 12:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

For that you could create the necessary number of empty images and simply drag/drop them into the tool.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri Aug 24, 2018 3:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

fail to convert



anim.pal
 Description:

Download
 Filename:  anim.pal
 Filesize:  768 Bytes
 Downloaded:  13 Time(s)


laser.zip
 Description:

Download
 Filename:  laser.zip
 Filesize:  114.07 KB
 Downloaded:  18 Time(s)


_________________

Back to top
View user's profile Send private message Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Aug 24, 2018 7:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

interesting, it's again the RLE encoder.
It seems even triple size of the pre-dimensioned result array is not big enough. So now it increases the array as necessary and this should make an end to these kind of encoder bugs.

thanks for this bug report

new version uploaded

Version 01.01.00.13
-(bugfix) RLE Encoder fixed (again). Now resizes array during encoding if encoded data exceeds the preallocated array size.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Tue Sep 04, 2018 2:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
they are necessary for the time consuming color conversion.
The Euclidean calculation may be fast for one color, but it still needs to find for every single pixel in the image the corresponding palette color.
And for this there is the slow
for x=0 to bitmap.width
for y=0 to bitmap.height
{
getPalettePixelColor(x,y)
}
function necessary.

You can speed it up significantly by storing the found indices in a hashmap with the bare RGB value as key. After all, a large part of these pixels will be background colour, and on sprites you generally won't have millions of unique colours anyway.

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Sep 04, 2018 3:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

That's exactly how it works already Wink and it did indeed raise the speed significantly.
Next to the multi-threading, that was one of the first things i made to increase processing speed.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Nyerguds
General


Joined: 24 May 2004
Location: Flanders (Be) Posts:300000001

PostPosted: Tue Sep 04, 2018 6:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

Heh. I should really look into multithreading... right now my Engie File Converter has this typical tendency to freeze the UI for a few seconds while it's saving stuff Face palm!
(in my defense, it was originally created for converting uncompressed single images from some Nintendo 64 format to normal PC formats.)

As for buffer sizes, for the TS and Dune II whitespace collapsing RLE implementations I never needed to worry about that; the .Net framework has a MemoryStream class, which is basically an automatically-expanding memory buffer handled as a stream. So yea, I never even need to look at the maximum size. I just write to it and then retrieve the final result as byte array.

I should actually implement that for my other compression algorithms too...

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Thu Oct 04, 2018 4:27 am    Post subject: Reply with quote  Mark this post and the followings unread

Version 01.01.00.13
Fails to convert
Ra2 unittem palette



flag.rar
 Description:

Download
 Filename:  flag.rar
 Filesize:  19.63 KB
 Downloaded:  14 Time(s)


_________________

Back to top
View user's profile Send private message Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Oct 04, 2018 11:40 am    Post subject: Reply with quote  Mark this post and the followings unread

new version uploaded. Seems i missed a 2nd place where the array needs to be resized.
Thanks for bug reporting.

Version 01.01.00.14
-(bugfix) RLE Encoder fixed (again).

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Wed Oct 24, 2018 9:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Can you add a save/load project feature? Should save all image routes, frame orders, and palette ignore/transparent settings. In case you would render a different size, or use a different palette.

And if I put in frames it will place last frame on first, I don't know why, but have to manually remove it and add it to the end.

Would it be possible to adjust orders by drag/drop?

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Oct 24, 2018 10:21 am    Post subject: Reply with quote  Mark this post and the followings unread

All good points and worth being added. Not sure when i have time to implement them though.

kenosis wrote:
And if I put in frames it will place last frame on first, I don't know why, but have to manually remove it and add it to the end.

Do you use a special file browser?
I tested with Total Commander and Windows Explorer (Win7) adding a list of files. Regardless if selecting the files from top to bottom, or bottom to top, or multiple one by one via ctrl, the files are added in the same order as highlighted in the file browser.

kenosis wrote:
Would it be possible to adjust orders by drag/drop?

gonna have to see how to add this. All the special cases aren't that easy to implement like
-multiple files d&d to a place where there are already files in the list (what happens to the files in the 2nd and 3rd column? should they move with the files from the 1st column, since they usually belong together?)
-1 file d&d on another, should it replace the existing one? should they switch places? should the d&d file get inserted into the list above the dropped cell?

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Wed Oct 24, 2018 5:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

If can really drag&drop to edit order, consider the columns, maybe a check box can be used to select single column or all columns. Or if not the check box, default single column can be better, because multi column can be achieved by multiple times d&d, but you cant move single column with the move all columns default.

I think people using image shaper would probably import all images from the beginning, and adjust them later, so if you d&d, it means deleting existing frames and adding after the target - drag frames 1-25 onto frame 27 would mean delete 1-25, and old frame 1 becomes frame 28. Or not drag drop, but cut/paste (onto selected frame), a note on paste effect (will add above/under target frame) for users can be enough already.

Since sometimes you can add frames to the end, so paste onto certain frame means under will be the right choice.

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Oct 26, 2018 8:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
Regardless if selecting the files from top to bottom, or bottom to top, or multiple one by one via ctrl, the files are added in the same order as highlighted in the file browser.

This is a Windows quirk, when you select in sequence it keeps the sequence except the file you drag with, that ends up at the beginning.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Nov 14, 2018 2:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

new version uploaded

Version 01.01.00.15
-(update) internal Drag & Drop added to the datagrid cells. If a cell is empty, the d&d value is set, otherwise a new row inserted. Existing values are not replaced!
-(update) [File] menu added to menustrip, which offers functions to save and load a project. A project includes the data from the datagrid and the complete palette setup.


Note: due to a quirk of the DataGridView, when d&d multiple cells, you have to keep shift/ctrl pressed and have to start dragging from the last selected cell. Otherwise the selection is lost/changed.
Note2: this tool is using the old kernel32 (Write/Get)PrivateProfileString functions. It needs to be tested if these work well enough when saving/loading huge projects with thousands of frames.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Thu Jan 10, 2019 8:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

You should always reserve an empty row at the bottom cause when I try to add images to the end it's easy to add to the last frame accidentally because the gap after the last frame is way too slim



QQ??20190110121946.png
 Description:
 Filesize:  555.79 KB
 Viewed:  18282 Time(s)

QQ??20190110121946.png



_________________

Back to top
View user's profile Send private message Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Mar 23, 2019 12:56 am    Post subject: Reply with quote  Mark this post and the followings unread

new version uploaded

Version 01.01.00.16
-(update) "Load from Clipboard" added to the Datagrid right-click menu. The clipboard image is saved in the Temp subfolder.
-(bugfix) Copy, Cut, Paste in Datagrid right-click menu fixed
-(update) Datagrid ensures a single empty row at the end
-(update) preview window moves to front as well, when program gets focus

\edit
Version 01.01.00.17
-(bugfix) annoying windows warning sound removed when adding files
-(bugfix) "combine transparent pixel" is applied only to the image in the column left of it
-(update) if multiple cells are selected when adding files, the user is asked if the files should be duplicated into the cells
-(update) the audio file SHPfinished.wav is played when SHP conversion is done


The audio file can be deleted, if someone doesn't likes it being played each time an SHP is done.

Duplicating the file(s) works only if the selected cells are all in the same column and the number of selected cells is bigger than the number of files to import.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Sat Mar 23, 2019 7:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

3 example images.
You put them into columns accordingly and have "combine transparent pixel" checked for the 3rd column, and you will get a normal ship with dithered shield.



1.png
 Description:
 Filesize:  307.03 KB
 Viewed:  17574 Time(s)

1.png



spearofadun.pal
 Description:

Download
 Filename:  spearofadun.pal
 Filesize:  768 Bytes
 Downloaded:  21 Time(s)


combine transparent pixel.7z
 Description:

Download
 Filename:  combine transparent pixel.7z
 Filesize:  1.21 MB
 Downloaded:  45 Time(s)


_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Sun Jun 09, 2019 9:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Change your icon please. It's almost identical to Epic Games except the text is different. Every time I click the wrong one.

Back to top
View user's profile Send private message Skype Account
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Jun 10, 2019 12:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

You should boycott the Epic Games launcher for its shitty exclusivity deals anyhow #Tongue

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
Display posts from previous:   
Post new topic   Reply to topic Page 2 of 3 [129 Posts] Goto page: Previous 1, 2, 3 Next
Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.3921s ][ Queries: 16 (0.0278s) ][ Debug on ]