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 Thu Mar 28, 2024 7:34 pm
All times are UTC + 0
Selection box loses pixel
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [24 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Dec 08, 2013 12:11 pm    Post subject:  Selection box loses pixel Reply with quote  Mark this post and the followings unread

When you select an area and then move the selected area, the pixel under the right border of the selection box are replaced with index0 pixel.
It simply loses the data of these pixel.

Another improvement suggestion.
Problem:
-i have an SHP with colored pixel in the top left corner
-if i paste an area inside the frame and then move the area, the pixel behind that area are gone.
Solution:
as long as you don't have the area unselected, the pasted area should be treated like a separate layer and not replace pixel on which this area is moved.


btw, great work Zaaz and Banshee fixing recently all these smaller bugs and making SHP Builder better than ever. Smile

_________________
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
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 12, 2013 7:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

I didnt see your post before, i'll look into it. thanks!

EDIT: What would you prefer, to copy or not to copy the pixels under the white border?
I have it working with copying right now.

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Fri Dec 13, 2013 2:40 am    Post subject: Reply with quote  Mark this post and the followings unread

As for your improvement solution, I dont know. Banshee isn't lying, the code is a total mess. I could try but I'd spend more time on it than Id like to.
Do you work on XP? Because otherwise, this is something I would implement in the wpf app.
EDIT: here's a build that resolves the selection border problem.
EDIT 2 : removed build

Last edited by Zaaz on Thu Dec 19, 2013 3:30 am; edited 1 time in total

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Wed Dec 18, 2013 10:50 am    Post subject: Reply with quote  Mark this post and the followings unread

I've been working a bit, the selection is (i think) ok now. I've disabled some tools on this build since I broke a couple lot of things. The Pen, Selector, Dropper, Flood, ColorReplacer should be working, however.

The build is linked.
EDIT: removed build

Last edited by Zaaz on Thu Dec 19, 2013 3:30 am; edited 1 time in total

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Dec 18, 2013 11:02 am    Post subject: Reply with quote  Mark this post and the followings unread

The new selection functionality is a dream. Smile Also nice that you now see exactly what is selected (previously it wasn't clear if all inside the border or also under the border is selected)

very nice work.

a small issue: when selecting a big area (e.g. ctrl+c on the whole frame) the program gets really slow when pasting with ctrl+v
e.g. a 300x600 SHP took about 10 seconds until the ctrl+v command was done. In the mean time it looked like the program would freeze.

suggestion: show in the bottom info bar, about how many pixel in x and y direction the selected area was moved.

_________________
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
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Wed Dec 18, 2013 7:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

For me pasting doesn't seem to work correctly. When I first paste something it does appear the way it should, but when I click on anything else after that, the selection rectangle disappears along with the thing I pasted.
It does seem to work when I first move the thing I pasted.

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 19, 2013 2:37 am    Post subject: Reply with quote  Mark this post and the followings unread

Okay, tell me it this one speeds things up for you. Bittah, that problem should be removed now. I disabled ShowGrid because I broke it, and I'll look into remaking it with your infos, LKO.

Build is z3.
EDIT: I had Scanline error, but I dont know how to reproduce it. Just a heads up.
EDIT: removed build.

Last edited by Zaaz on Thu Dec 26, 2013 8:21 pm; edited 3 times in total

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 19, 2013 2:37 am    Post subject: Reply with quote  Mark this post and the followings unread

- double post -

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Dec 19, 2013 2:43 am    Post subject: Reply with quote  Mark this post and the followings unread

What makes you break so many features to try to fix this bug?

Back to top
View user's profile Send private message Visit poster's website Skype Account
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 19, 2013 2:57 am    Post subject: Reply with quote  Mark this post and the followings unread

@Banshee
Haha, I tried to recode a big part of FrmSHPImage,  to make it clearer for me. I went quite far and didn't want to go all the way back, so I went with it and let a couple of things broken until I figure out what I want to do with them.

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 19, 2013 7:53 am    Post subject: Reply with quote  Mark this post and the followings unread

That last version is a lot faster and running really well. Smile

a few more things about the selection box
-when you have the entire frame selected, you can't unselect it anymore, because there is no free place into which you can click
-the selection keeps active/visible even after changing the current viewed frame, so you can't unselect it by switching to a different frame and click there on a free place
-changing to color picker or another drawing tool doesn't unselects the selection area too
-the undo-function isn't working for the selection area (e.g. it doesn't reverts the position if the selection was moved. Using ctrl+z to remove/unselect the selection area might be also nice, like undoing the ctrl+v paste command)

_________________
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
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 19, 2013 8:13 am    Post subject: Reply with quote  Mark this post and the followings unread

I'll look into adding shortcuts, like ..
DEL : Delete selection
ENTER: paste selection

Meanwhile, you can unselect and lose the selected area by right-clicking.
To add support for undoing selection actions, noted.

EDIT: what is the behavior you prefer when changing frame? Do you want to lose the selected area?

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 19, 2013 8:30 am    Post subject: Reply with quote  Mark this post and the followings unread

when changing the frame, the selection should be lost.
You can still press ctrl+v again to paste it into this frame as well then.

On the previous frame where you had the selection, the selection should be simply drawn.

This way you can
-ctrl+v to paste into a frame
-go to next frame
-ctrl+v to paste into a frame
-go to next frame
etc etc

btw, if i paste a selection on a certain position in frame A, and then press ctrl+v in frame B, the selection should appear at the same place as it was in A (to speed up things).
Only when selecting a new area and saving it with ctrl+c, the pasted selection area should be reset to 0,0.

_________________
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
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Thu Dec 19, 2013 12:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Since you're already able to manually abort the selection via right-clicking, I don't think that changing the frame should cancel the selection. This way you'll quickly be able to select a part of a frame, copy it, paste in photoshop, change the frame in OSSB and immediately press Ctrl+C again without having to re-select the frame again, paste in photoshop and so on.

That said, it would be convenient if you could instantly select a whole frame via Ctrl+A.

Another thing that would be nice is if OSSB wouldn't paste transparent areas that were copied from another program as white in OSSB, but use the background color instead (I haven't tested whether this is still the case with your demo or not yet though).

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 19, 2013 12:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

when nothing is selected, ctrl+c copies already the entire frame. no need to select it before with ctrl+a

when changing the frame, the selection is currently still active and drawn above the frame. So on a full area selection, you don't see the frame underneath the selection.

Since the selection is now a new layer, it is only applied once deselected. So when copying stuff on every frame, you would be forced to unselect every time you switch the frame.
Thus you add an additional unnecessary step.
-change frame
-paste selection
-unselect selection (so it is applied to the frame)
-change frame
-paste selection
-unselect selection (so it is applied to the frame)

with my suggestion it is only (this is also how it works now with the old SHP Builder)
-change frame
-paste selection
-change frame
-paste selection

Bittah Commander wrote:
That said, it would be convenient if you could instantly select a whole frame via Ctrl+A.

not necessary. SHP Builder always copied the whole frame by simply pressing ctrl+c (if nothing was selected).

_________________
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
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 19, 2013 2:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Im not sure I understand how you want it to behave. Currently,
ctrl v will only copy in the selection layer as to not overwrite
any pixel in the frame.

Arent you saying that you want it to paste directly to the frame? Didnt we want to avoid this situation? I have the enter key as a new way to apply the selection, that could speed the process of copy/pasting. This combined with a pasted selection that would have the same position as the original selected area.

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 19, 2013 2:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

no, the layer is ok and it should not draw directly.
But when i change the frame, then the selection should draw before switching to the new frame.

I just want to avoid the additional "draw selection" command when pasting something into multiple frames.

But i guess, you simply implement it in the best possible way for you, and we then simply have to adapt to the new behaviour.

_________________
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
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Thu Dec 19, 2013 3:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ah, I get it now. I will make it happen.
Oh and Bittah, Ill check it out.

Also idk if you guys know, but when applying a selection, if the background is disabled, the background pixels arent supposed to be copied.

EDIT: I can't believe it, there's no standard way to copy a bitmap with transparency on Windows. What the hell!

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Mon Dec 23, 2013 4:32 am    Post subject: Reply with quote  Mark this post and the followings unread

Okay, one or two things today.

1. What version of photoshop are you guys using?
I think I'll need to download it to check if it copies a png or jpeg or whatever.

2. I've worked a tiny bit today on the selection.
   Still didnt implement undo on selection - movement/select/unselect.
   However, here's what I added:

    - Last pasting position.
      Set when doing Ctrl + V and applying the selection.  
      Reset on Ctrl + C.

    - Reset Selection when changing the current frame.
      The selection will be applied in this case only if you selected the option in:
          Window Preferences - Tab Misc - CheckBox Apply Selection ...

    - 2 keyboard shortcuts, ENTER and DEL .
      ENTER : apply selection
      DEL :  
              A) if you moved the selection, it will only delete the selection layer.
              B) if you only selected an area, it will delete it from the frame.
                  So, the same as the cut command, but it doesnt copy to Clipboard.

Note: the shortcuts are nice I think, however you'll have to click on the image
        in the frame window if you previously put the focus in the FrameIndex or
        Zoom TextBox. That doesn't prevent you from quickly pasting on
        multiple frames, because I added 2 other keyboard shortcuts,
        LEFT ARROW, RIGHT ARROW. They respectively select the preceding
        and following frame.

The build is 20.z4.
Tell me if it works!
EDIT: build is 20.z5 now.

What's next?
1. To add the support to undo the other selection actions.
2. To add the option to blindly draw on multiple frames.
3. To fix the grids.
4. To add the trimmer function.
5. To fix the other tools.
?. To copy external bitmap with transparency (i'll see what i can do).

Good enough priorities?

EDIT: removed build. I will create a new thread for my version of OSSB to centralize my updates.

Last edited by Zaaz on Thu Dec 26, 2013 8:22 pm; edited 5 times in total

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


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Tue Dec 24, 2013 3:15 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm not sure what's going on, but I keep getting the old selection box after installing the demo. I also tried clearing my temporary internet files to make sure I'd get a new structure.xml file, but that didn't make a difference.

In any case, I use Photoshop CS6.

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Tue Dec 24, 2013 5:07 am    Post subject: Reply with quote  Mark this post and the followings unread

I know what's going on. The installation downloads the SVN version over his one. Install it once and copy his executable to the program directory.

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 Dec 24, 2013 11:24 am    Post subject: Reply with quote  Mark this post and the followings unread

The selection works good and as it should be. I haven't found an issue yet.

Though there is another small problem now
-the background and shadow color in the image doesn't look like in the palette anymore (see attached picture)
-when using a red remap range in the palette, the remap is blue in the image
-when switching to the shadow frames, the palette doesn't update and switch to the 2 color mode. It still shows the full palette, even though only the first 2 colors are selectable. When minimizing the program and bringing it back up, the palette is correctly updated and showing the 2 color mode

-the open file and open palette default paths are the same. If the last thing you opened was a palette, the open file path will point to this and not to the folder where you was last working in with the SHP files.

\Edit
-it's not only the background, shadow and remap color that is wrong it's the whole palette (see attach picture)



SHPBuilderWrongPalette.png
 Description:
the SHP on the right is showing the full palette, done with an older version of SHP Builder. Yet no color matches the palette
 Filesize:  15.89 KB
 Viewed:  7087 Time(s)

SHPBuilderWrongPalette.png



SHPBuilder.png
 Description:
that red stuff in the image is the blue shadow color
 Filesize:  17.88 KB
 Viewed:  7091 Time(s)

SHPBuilder.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
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Tue Dec 24, 2013 3:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Damn it, I'm sorry. I fixed the palette problems and hopefully the initial dir problem too. I updated the build posted above, 20.z5.

Back to top
View user's profile Send private message
Zaaz
Disk Thrower


Joined: 21 Apr 2013
Location: Canada

PostPosted: Fri Dec 27, 2013 7:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

@Bittah Looks like there's no easy way to copy a transparent selection.

http://stackoverflow.com/questions/12258519/how-to-save-pngimage-from-clipboard

What you can do is to temporarily set the background color to a white color (15 in ts unittem.pal), disable the background colour and apply the selection, the white background shouldn't be copied. Just don't forget to reset your background settings.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [24 Posts] 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.2014s ][ Queries: 15 (0.0122s) ][ Debug on ]