2014년 12월 5일 금요일

Image File Format Requirements - Canvas Background for Color Picker

Is there a picture file size or format requirement that I'm not aware of? I've been looking all over this forum for over an hour now and and can't find a solution to this problem.

I'm trying to create a color picker based on a canvas background (as was recommended in another post here https://groups.google.com/d/msg/mitappinventortest/e34CCC1FLjk/oE4oGAZT3hEJ) and none of the palette images I set as the canvas background show up on thedevice screen...

1. Capture.png - Which came from the post I mentioned above.
2. ColorPalette.png - Also tried this file as a *.jpg, at 75% and 50% of the original size.
3. ColorPalette.bmp - Same thing, exported as a bit map.

The three files above do not render when I try to display them asimages.
The three files above do not render when I try to display them asscreen backgrounds.

However when I select something inappropriate from another project (BeerButton.jpg) as the canvas background it DOES render on the device.

Screen background color is "none".
Canvas background color is "none".

I imagine I'm missing some tiny little detail but I cannot for the life of me figure out what it is. I've even gone as far as to programmatically set the height, width, and visibility of the canvas... no change. 

 





have you tried setting canvas width and height arguments to a set number of pixels.  If the image is the background on the canvas then it should stretch and compress with canvas.  As far as I know there are no limits on image types and sizes but I know png and jpg work.  Also a know glitch is where it you don't connect using the qr code then images may not transfer.  It has not happened to me but some people in my class have experienced it.



Thank you for the advice, good thinking! I checked and this image is 593H x 295W. I've set the height and width of the canvas accordingly and still no change.

It's 94dpi, 32 bit. Maybe it's too much detail to be rendered? I might try converting it to 24 bit and see what happens.



it works fine for me, tested the first image on Nexus 5, see attached project
do you test with the emulator?




I'm using a Samsung Galaxy S4.

I loaded your *.aia file and it worked correctly, I then loaded my project and it miraculously works without my changing anything at all.

I really dislike problems that solve themselves. Without knowing the cause I can't guarantee it won't happen again.  

I will verify that all the attributes you have set for the canvas in your project are set similarly in mine. Thank you all for your help.


댓글 없음:

댓글 쓰기