couldn't find a way to load a 960x624 image on j2me netbeans emulator - image

How to show a full 960x624 image using j2me canvas?
I wouldn't mind to scroll but I don't want it resized.
{image = Image.createImage("/earth.png");}
{g.drawImage(image, width, height, Graphics.BOTTOM | Graphics.RIGHT);}
doesn't serve the purpose. I want to know if I have any option to get both the horizontal and vertical scroll bars without actually creating them to view the whole image?
The image size should be same as I don't want the TEXT on the image become unreadable.

Related

How to extract on-screen area on XD of an image

I just received the XD file from the designer, now am trying to extract the nav area image from the canvas but image is too spread out from the canvas how it can be cropped to the area of the nav.
Use Adobe Photoshop To Resize them to Fit Original image
or
if you want part of image you can use one of image magnify plugins first
they will fit image to canvas
then use export
Also you can use Web Export Plugins

Resizing a PNG's dimensions (Length x Width)

Alright, I will provide specifically what I need. I am using Windows 7. I need this done on a .PNG extension file. Rightclick any png file and click Properties. Under the 'Details' tab it shows the images' dimensions, the width and height in pixels.
I have tried every editor but photoshop which I do not have to create an image with a height of 23552. I use pixlr editor until I can get photoshop located at https://pixlr.com/editor/. Inside the editor I can have an image loaded which I am editing. Using that web application I can resize the image by going to 'Image' tab and pressing 'Canvas size...'. It restricts the height to 4000, but I need it 23552. The reason I need it that high is because when you animate a minecraft texture in a Resource Pack, it detects stacked images by height in the same png, not sure exactly but I know how to animate them with minecraft, I just need a way to get a 23552 pixel height on a png image. Thanks for any help I can get.
Use Microsoft Paint. In Paint, open your image and click "resize" on the Home tab. Enter your desired height and save the photo.
Source: http://windows.microsoft.com/en-ca/windows7/resize-a-picture-using-paint

How to resize between 3.5" and 4" screens (dynamic constraints in autolayout?)

I have one view filling the screen with a background image. Other views (text fields) are in exact positions (the background image includes the text field background images). When I change from 3.5" screen to 4", the text fields don't change in the same way that the background resizes. The bg image simply resizes to fill the screen, but the text fields jump out of alignment.
Is there a way to have two sets of constraints, one for each screen size? or is there a way to have views resize proportionally to another view?
EDIT:
Is there a way to have two sets of constraints, one for each screen
size?
Yes, by adding constraints programatically and checking [[UIScreen mainScreen] bounds] to get the screen size.
or is there a way to have views resize proportionally to another view?
Yes, you could set this up in interface builder. But it will be hard to manage, I would manage the constraints manually in code since you are using a custom background image the textviews need to position exactly
You're going to struggle to get these things to line up properly with the text view backgrounds being part of the background image.
You should amend your image assets and use the background property of UITextField to have an actual background image, and remove the boxes from your main background image. The icons could be separate images as well.
Failing that, it would make more sense to have the image stretch underneath the text boxes rather than on top.
Your layout is doing what it should do based on your description, but the image isn't stretching in the right way. In your screenshots, username is always the same distance from the top, and the others are the same distance from the bottom, but that isn't how image stretching works. I don't know how you've set it up but it would make sense to have a single image the size of the 4 inch screen, which has the bottom cut off for 3.5 inch devices, and constrain everything from the top.

Large Image Centering

I get from the server image 800X800 in jpg format and i need to display it in center of the WP7 screen. I need to display like example in this url
http://imageshack.us/photo/my-images/152/examplea.jpg/
I prefer to do this without cropping of image if it possible, because i get new image always in start of application. I tried with stretch, rectangle geometry.
I write this without code example, because this is only insert a image.
Sorry for my bad English.
Try like this in Xaml
Image name="Image" width = 800 height = 1000 stretch = fill Margin="-215,-120,-255,-184"
Then set the source

Replaceing color on a image realtime

First of all I will explain my situation so you can know my problem a little better. I'm making a HTML5 app. I have a canvas, and using a color picker you can change the color of the canvas. Now i have a picture which I want to put on the canvas but that pictures color needs to be changed using a color picker. So i need to replace, lets say, black color on that picture and put it on the canvas so it dosnt screw up the background.
So that will look like this:
1st color picker- changes the color of the canvas
2nd color picker - replaces the black color on the image with the one in the color picker and puts it on the canvas
Now my problem is how to replace the color on the image without reloading the page.
My only condition is no using silverlight, flash, java or any other similar tehnology that need 3rd party software to be installed on the device.
Thanks in advance.
If you dont understand my query fully, feel free to ask.
My approach with a JS only solution could be:
Loading the image inside a canvas element. Look at the MDC canvas tutorial
Trigger the user click on the canvas and get the pixel color (see links below to know how to get the color of a pixel) and look at this answer to get the mouse position
Substitute all the colors in the canvas with the one the user pick. For some examples about pixel manipulation:
Pushing pixel with canvas at Mozilla Hacks
http://beej.us/blog/2010/02/html5s-canvas-part-ii-pixel-manipulation/
This JS at mezzoblue apply heavy filter to an image
After some canvas experiment I notice that mostly in all the browser the pixel manipulation with canvas could be very slow also with small images. So another experiment to do could be to get the pixel color and then:
pass the color information to a PHP (or another server side script) with an AJAX call
do the color manipulation with an image library like GD or imagemagik
return back your image with the Ajax response
reload your canvas with the modified version of the image

Resources