Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend image based effect funcs #433

Merged
merged 1 commit into from
Apr 14, 2017
Merged

Conversation

redPanther
Copy link
Contributor

@redPanther redPanther commented Apr 13, 2017

1. Tell us something about your changes.

  • add func for setting minimum size of effect buffer image. This must be done asap in the effect
# scale buffer minimum to 64x64 , keep aspect ratio
# you can get real size of buffer with hyperion.imageWidth() hyperion.imageHeight()
hyperion.imageMinSize(64,64)
  • add posibility to save a image to memory list. Func returns the index of the saved picture. You can pre draw your frames and then show just the images in the loop.
imgList = []
hyperion.imageSolidFill(255,0,0)
imgList.append( hyperion.imageSave() )

hyperion.imageSolidFill(0,255,0)
imgList.append( hyperion.imageSave() )

hyperion.imageSolidFill(0,0,255)
imgList.append( hyperion.imageSave() )

# Start the write data loop
while not hyperion.abort():
	for img in imgList:
		hyperion.imageShow(img)
		time.sleep(1)
		if hyperion.abort(): break

2. If this changes affect the .conf file. Please provide the changed section

3. Reference an issue (optional)

Note: For further discussions use our forum: forum.hyperion-project.org

@brindosch
Copy link
Contributor

Cool!
Will test asap.
Will expand docu too.

Did i mention we got touch drag support for led visualization?
atatanasov/gijgo#48 (comment)
Thanks to @atatanasov

@brindosch
Copy link
Contributor

I tested hyperion.imageMinSize(64,64)
Hm, my intention was to have a hugher image playground, Actually it is a hugher playground, but zooming wasn't my thought, as you zoom it's just a part of a picture now visible!
I thought about a version without zooming. Like usual capture pictures -> led area calc. This should smooth all (diagonal) lines, gradients with hard color stop and so on.
Also: As you said, imageH/W can't be used with it, it looses center.

Request:
drawDot(), i like dots! They are so DOTish!
Don't be a dot, dot!

ImageSave, very cool!

@redPanther
Copy link
Contributor Author

After minsize is called the image buffer is resized. It keeps ratio with hardware leds.
You can use image w/h for calculate the center, because this is updated after resize.

It is important to call minsize before any drawing actions.

I had to use the scaled func of qimage because there is no other way to set new w/h without destroying the image object.

@brindosch
Copy link
Contributor

Ouh, wow the color calcs are somehow... different :D
I need to buy a led matrix!...
It works as intended. Thank you

@redPanther redPanther merged commit f620917 into hyperion-project:master Apr 14, 2017
@redPanther redPanther deleted the efx branch April 14, 2017 06:44
@redPanther
Copy link
Contributor Author

You get the ...... dot, will do it in the next time slot. BTW now we have the image stack. Next we can build animation methods and use image filters (e.g. blur, wave, ripples, ....)

@redPanther
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants