SimpleImage



< CS101 Citrix gateway for mac.

  1. Simpleimageresizer Com Upload
  2. Simple Images
  3. Simpleimageresizer
  4. 1080x1080 Image Resizer
  5. Simpleimage Javascript
  6. Simple Image
  7. Http://simpleimage.com
For reference, here are all the functions, such as

BaseUri: Gets or sets a value that represents the base Uri of the current BitmapImage context. CacheOption: Gets or sets the BitmapCacheOption to use for this instance of BitmapImage. CanFreeze: Gets a value that indicates whether the object can be made unmodifiable. Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Digital images are made of pixels. A pixel is a small point of colored light. When you look at a computer monitor, the image you see is actually made of a grid of these tiny dots of light. They are so small and so close together that it looks like one continuous picture. This specifies any shell prompt running on the target # Early console on uartlite at 0x40600000 bootconsole earlyser0 enabled Ramdisk addr 0x00000000, Compiled-in FDT at 8031cda8 Linux version 3.17.0-126658-g6807aea (michael@mhenneri-D04) (gcc version 4.8.3 20140131 (prerelease) (crosstool-NG 1.18.0) ) #1647 Fri Nov 21 10:33:05 CET 2014 setupcpuinfo: initialising setupcpuinfo: Using full. Nifty Image Puzzles. Nick Parlante, Nifty Assignments 2011. The 'image puzzle' is a short, nifty Media Computation exercise. You have 2-d pixel data for image of a mystery thing, however the pixels are messed up in some way.

pixel.setRed(number); to load and manipulate images.
image = new SimpleImage('flowers.jpg');Set the variable image to hold the 'flowers.jpg' image
image.setZoom(5);Set the image to print at 5x size on screen. Useful to make changes on very small images such as 'x.png' visible.
print(image);Print the image to the screen.
pixel = image.getPixel(0, 0);Retrieve the pixel at x,y (0, 0) and store it in a variable named pixel (i.e. the upper left pixel). Changes on that pixel, e.g. pixel.setRed(255);, change the pixel in the original image.
print(pixel);Print the values for one pixel, in the format 'r:200 g:12 b:166'
pixel.setRed(number);
pixel.setGreen(number);
pixel.setBlue(number);
Change the pixel's red value to be 255 (we can specify any value 0.255 within the parenthesis). There are analogous functions pixel.setGreen(number); and pixel.setBlue(number);for the other colors. If the number is outside the range 0.255, it is automatically limited to 0 or 255.
r = pixel.getRed();
g = pixel.getGreen();
b = pixel.getBlue();
Retrieve the red value from a pixel (a number in the range 0.255), and store it in a variable named r. There are analogous functions pixel.getGreen() and pixel.getBlue() for the other colors.
image.getWidth(), image.getHeight()Retrieve the width and height of an image.
image.setSize(width, height);Scale an image up or down in size so it has the given width and height.
image.setAsBig(other_image);Scale an image up or down in size, keeping its proportions, so it is at least as big as the other_image specified. Useful for bluescreen code where we want to make the background at least as big as the foreground. Previously this function was called 'setSameSize', so you may see that name used in older code examples (it still works).

Code Area

Here's a scratch area to try out code.


Simpleimageresizer Com Upload

Nick Parlante, Nifty Assignments 2011

The 'image puzzle' is a short, nifty Media Computation exercise. You have 2-d pixel data for image of a mystery thing, however the pixels are messed up in some way. The students write code to fix the image, and so reveal the mystery object. What makes this assignment nifty is that the code required is quite simple -- basically calling a couple methods, passing in the right values -- yet the puzzle problem is engaging and the output is neat. It's also a pretty short exercise however you slice it. I got his idea originally from David Malan.

Simple Images

I use this in CS101, a CS0 / CS Principles type course. In this course I provide the 'loop to touch every pixel', so the students just write the change-one-pixel code, essentially calling a few setXXX() methods with the right values to fix the image.

Three Puzzles - How to Adopt

It's a nice simple assignment idea; as soon as you see it, you'll understand how it works. Part of the value of this page is that three versions, complete with PNG files and problem statements are done, so it's very ready to adopt.Using the CS101 code-in-browser infrastructure below, the puzzles will just run embedded in this page. You can just point students here, or copy the puzzle PNG files to solve it your own way. The original images were public domain, and I hereby place these PNG files in the public domain.

1. Iron Image Puzzle


The iron-puzzle.png image is a puzzle; it contains an image of something famous, however the image has been distorted. The famous object is in the red values, however the red values have all been divided by 10, so they are too small by a factor of 10. The blue and green values are all just meaningless random values ('noise') added to obscure the real image. You must undo these distortions to reveal the real image. First, set all the blue and green values to 0 to get them out of the way. Look at the result . if you look very carefully, you may see the real image, although it is very very dark (way down towards 0). Then multiply each red value by 10, scaling it back up to approximately its proper value. What is the famous object?


2. Copper Image Puzzle


The copper-puzzle.png image is a puzzle -- it shows something famous, however the image has been distored. The true image is in the blue and green values, however all the blue and green values have all be divided by 20, so the values are very small. The red values are all just random numbers, noise added on top to obscure things. Undo these distortions to reveal the true image.

SimpleImage

First, set the red values to 0 to get that of the way. You may be able to see the image very faintly at this point, but it is very dark. Then multiply the blue and green values by 20 to get them back approximately to their proper values. What is the famous object?

Simpleimageresizer


1080x1080 Image Resizer

3. West Image Puzzle

The west-puzzle.png image is a puzzle. It shows something famous, however the image has been distorted. Use if-logic along with other pixel techniques to recover the true image. The true image is exclusively in the blue values, so set all red and green values to 0. The hidden image is encoded using only the blue values that are less than 16 (that is, 0 through 15). If a blue value is less than 16, multiply it by 16 to scale it up to its proper value. Alternately if a blue value in the encoded image is 16 or more, it is random garbage and should be ignored (interpreted as 0). This should yield the recovered image, but all in the blue channel. As a final fix, the image should be in the red channel to look more correct, so change your code to also move the values from the blue channel to the red channel.

SimpleImage

Simpleimage Javascript


Simple Image

Metadata

Summary

Image-Puzzle is a neat exercise, where the students write a few lines of code to reveal a hidden image.

Niche

CS0 or later. It's a unique combination of a quite simple code and an engaging puzzle. In CS0 I provide all the infrastructure, and they just write the core 'fix one pixel' code which is basically just a few setXXX() calls with the right expressions to fix the image. To add work for a more advanced class, you could make the students implement loading and displaying the images.

Prerequisites

The code required is quite simple. However, you also need to have explained that an image is made of pixels and each pixel can be represented by red/green/blue values. The x/y organization of the pixels is not stressed by this project, as you basically just loop over all the pixels. Obviously this is pretty easy to implement in any language.

Strengths

The strength of this assignment is that the 'puzzle' aspect draws the students in, the code required is small, so it can fit into a course easily, and the output is quite neat. Because it is so small, it's pretty easy for the instructor to create more instances of it.

Weaknesses

It's a small assignment. It's a great way to make a few points about pixels and motivate writing some method-calling code, but it's not that big. It's just a little thing you can use.

Http://simpleimage.com

Extra info about this assignment: