I cant make a dynamic image path in pdf

I've been trying to display an image in a fpdf file, it only works when I specify the exact location of the image. Can I make it dynamic? Heres sample line of code:$this->Image('fpdf/img/logo1.png',10,6,30);and it works when I turn this way: D:\Installed Apps\New folder\XAMPP\htdocs\votingsystem\application\views\admin\senior\fpdf\img\logo1.png',10,6,30);I want to transfer it to another laptop, I'm afraid it wont work.I always get this error: Message: fopen(fpdf/img/logo1.png): failed to open stream: No such file or directoryI use code i...Read more

Proper algorithm for images processing

I'm trying to resolve problem related to image processing, but it seems that I have stucked in choosing of proper algorithm. Maybe someone of you can help me and say where is the problem in my reasoning of the problem. Let's assume that we have two images 16x16 pixels. As the user, I'm choosing two points on this images. As the user I know that i.e. point x1(8,8) and y1(10,10) are the same point as in the second images, let's say x2(5,5) and y2(8,8).So this two pair of points are some kind of vectors for me. So let's say that I can count length...Read more

image - Showing chart coordinates in userform using mousemove

I am trying to make userform that can show chart coordinates when i hover mouse over the chartHere are some explanations:-I have userform named "userform1" that has image named "image1"-EDIT : the same userform has height (467.25),left (0), top(0),width(876), startupposition = 1-CenterOwner-the same image has height (426),left (6), top(6),width(702)-the same userform have 2 label named "label_x" and "label_y"-the image will import chart with x value of (0 to 100) and y value of (100 to 200)-the code below is to show coordinates of image1 when I...Read more

How can i get a list of the Codenameone FontImages and descriptions, to render in a custom image chooser dialog?

I am using CN1 to build my app and i want to create a screen where the user can search and select from the list of available Material Font Images. How can i get this list please, ie. i will need the char code ("\uE900") and the description to search upon. I pretty much want to replicate the dialog that CN1 built in their cool, new Guibuilder.By using the same approach, this hopefully means the list will grow automatically as the CN1 team add more in.I had thought about deconstructing the FontImage class text from Github into a manageable List b...Read more

image - Codename One simulator show only middle of picture

I am using below code to get image from url. In the simulator only the middle center of the picture is shown in correct height but image is stretched, looks like it takes 1/3 of the original picture from center height. How can I get the full picture in the simulator?EncodedImage placeholder = EncodedImage.createFromImage(Image.createImage(100, 100, 0xf0f00000), false);URLImage img = URLImage.createToStorage(placeholder, "profilbillede.jpg", URL, URLImage.RESIZE_SCALE);img.fetch(); //border containerContainer ct = new Containe...Read more

image widthis less than the display width then how to set the image in total display width in codename one

how to show the image in total width of the device when the image width is less than the device width?image sizes :width - 1274 pixels,height - 105 pixelsdevice sizes:width - 1920 pixels,height - 1200 pixelsenter code hereImage image = Image.createImage("/mainpageheader1.png");Label appHeader = new Label(image);appHeader.setUIID("appHeader");loginForm.addComponent(BorderLayout.NORTH,appHeader);...Read more

image - Size of URLImage as a Label icon

My goal is to download an image of any size, apply a circular mask to it, and show the image on the screen with a size of 512 x 512. I try to use a URLImage with a 512 x 512 placeholder and circular mask and put it on a Label via setIcon(). However the label gets the correct height (512) while the image is drawn in its natural size, in a circular shape. I want it to fill the label vertically, preserving the aspect ratio.My code: EncodedImage img = URLImage.createToStorage( roundPlaceholder, // roundPlaceholder is 512 x ...Read more

codenameone - CodeName One - Image gets pixelated when scaling

I am getting an image dynamically from a webservice. Afterwards I am supposed to use it as background for the upper half of the screen. My problem is that I only get one size of the image (which should be approximately right for many smartphones phones) but when I resize it to make it fill half of the screen it gets pixelated.I have tried putting it as background of a container (adding padding to the expected size) and using BACKGROUND_IMAGE_SCALED_FILL and/or using Image methods scaledHeight/scaledWidth, fill and scaled.It doesn't matter if I ...Read more

Why the decreasing the png/jpg quality factor in ImageIO.save() does not decrease the output image file size?

I have been using ImageIO.getImageIO().save(image, os, ImageIO.FORMAT_PNG, qualityFactor)method to save an Image in a file. Whatever float value between 0.0 and 1.0 I use as qualityFactor I always get the same output file size in kB, whatever format I choose (PNG or JPEG).NB : I only checked this on the simulator (iPhone / Android) not on the real device.What is the proper way for the qualityFactor to be taken into account ?Cheers,...Read more

drawing - Is it possible to save a generated image in Codename One?

My question is related to this previous question. What I want to achieve is to stack images (they have transparency), write a string on top, and save the photomontage / photocollage with full resolution. @Overrideprotected void beforeMain(Form f) { Image photoBase = fetchResourceFile().getImage("Voiture_4_3.jpg"); Image watermark = fetchResourceFile().getImage("Watermark.png"); f.setLayout(new LayeredLayout()); final Label drawing = new Label(); f.addComponent(drawing); // Image mutable dans laquelle on va dessiner (fond b...Read more

list - Codename One: How can I scale an image to fit width of screen?

Good evening,I'm using Eclipse with the UI-Framework Codename One.I would like to know how it would be possible to scale an image to fit the width of the screen?I would like to create a list with one image( or even an imageslider if this is possible), which has the full width of the phone, and under that some text.Another question is, how can I set an Image via Hastable and Vector from code ? I tried everything but I can't find a solution.Thank you a lot,Greetings Patric...Read more

image - Creating a new window for toggles Processing (ControlP5)

This is my image generator which works with toggles. I would like to have the toggle buttons in a new window. I tried using PApplet, but it doesn't seem to show anything. How to add an extra window just for the toggles?import controlP5.*; PFont myFont;boolean showBackground = false;boolean showObjects = false;boolean showGrids = false;boolean showType = false;ControlP5 cp5;PImage[] objects = new PImage[30];PImage[] grids = new PImage[29];PImage[] backgrounds = new PImage[30];PImage[] type = new PImage[30];int currentBackgrounds;int currentGrid...Read more